Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

German umlauts problem in IE7


Go to End


5 Posts   3052 Views

Avatar
spierala

Community Member, 80 Posts

27 November 2009 at 2:30am

Edited: 27/11/2009 2:31am

hello all,

I have a strange problem just in IE7. German umlauts (öäü) do not appear correctly. This problem appears only with my custom silverstripe input fields for page content. Normal page content is shown correctly... there umlauts appear in the database as html-code like ä [=ä]

Can I somehow tell my input fields to convert umlauts to html-coded characters similar to the standard content text input seems to do it?

And one additional question: why is the silverstripe database encoded latin1-swedisch? I guess utf8 could solve the umlauts problems. I also tried this to change the collation manually in the database to utf8, but the Strings somehow arrive wrong in the database.

Thanks for your help,
florian

Avatar
slamby

Community Member, 21 Posts

27 November 2009 at 5:29am

Florian,
you need to do some research on a topic called character encoding / character decoding.

I'll give you some hints, which will get you going:
If I type something here, my editor or browser has set a character encoding. Lets say utf-8. Now you store it to your database. Most people do not know, which character encoding there database is actually using. MySQL for example uses latin 1 per default. So it could be that your transmitted data is stored in latin 1 instead of your original encoding. Next step is when you want to pick up the data again from your database to display it somewhere. It could be that your database delievers the data in a different encoding than it uses to store it... Not to mention the client i. e. webbrowser, which will show it up again. Do you know, it is using utf-8, latin1 or whatever to show what it has got to display?

You can only solve this, if you know exactly what is going on and where it is happening. Every step can be configured or manipulated. Google provides a lot of stuff on that issue.

Hope this helps.

Avatar
spierala

Community Member, 80 Posts

3 December 2009 at 1:23am

hey slamby,

thanks for your answer. I tried so input the data with a different browser (Safari)... then suddenly the data arrived correctly in the database...

Florian

Avatar
ChrisBryer

Community Member, 95 Posts

3 December 2009 at 5:14pm

one other thing to check is if your ss templates are encoded in utf-8. its usually a setting in the authoring software (notepad++, dreamweaver, whatever you are using). I know that makes a difference for the translated static text stored in the lookup tables like mysite/lang/en_US.php, but not sure if it makes a difference with content from the database. its normal to see the translated umlauts in the database.

hope it helps,

-Chris

Avatar
spierala

Community Member, 80 Posts

26 December 2009 at 5:55am

Edited: 26/12/2009 5:55am

hello!

it finally helped to include the meta tag to the head of the main page.ss template file:

<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

greetz,
florian