Hi Matthias,
It does not generate a file, it uses a service url, the styles you define are stored in the db. As soon as you add a new one and go back into the editor it will appear.
That is strange that you would get a syntax error based on content because it is passed in as a parameter of type text, there is no string concatenation. Are you sure the table column you are saving to is configured for unicode?
If the table is not configured for unicode it will change unrecognized chars into ? in the db.
Best,
Joe