[TYPO3-dev] Euro sign with utf8
Martin Kutschker
martin.kutschker-n0spam at no5pam-blackbox.net
Thu Feb 14 15:18:16 CET 2008
Steffen Kamper schrieb:
> "Steffen Kamper" <steffen at sk-typo3.de> schrieb im Newsbeitrag
> news:mailman.1.1202989661.20229.typo3-dev at lists.netfielders.de...
>> Hi,
>>
>> what a simple thing usally, but i'm not able to render it on a site with
>> old MySQL(4.0)
>> All is set to utf8, i have a textfield "Price" with content eg "750 ?"
>>
>> Value in database is saved correct, but printing it out in FE i get only
>> questionmark.
>> (All other Umlauts are correct)
>>
>> I googlet for it but didn't found a solution. Masi? :-)
>>
>> vg Steffen
>>
>
> solved.
> The site isn't in utf8, and in Template there was
> config.metaCharset = utf-8
> config.additionalHeaders = Content-Type:text/html;charset=utf-8
>
> which is definitive wrong.
You wouldn't need the additionalHeaders setting, but otherwise this is
ok. What happens is that the interal charsset (probably iso-8859-1) is
converted right before the final output to utf-8.
> Strange that Umlauts where rendered correct with this setting.
Not so strange. iso-8859-1 has no charset, though the superset
windows-1252 has. Any character unknown will be converted to a question
mark.
So if you need utf.8 in output but have iso-8859-1 in the DB use this:
config.renderCharset = windows-1252
config.metaCharset = utf-8
Why? IE (but I think FF as well) send happily all characters of
windows-1252 to the server, even if the page charset says its
iso-8859-1. As windows-1252 is a superset this won't trouble TYPO3.
The windows charsets has additionally the Euro sign, a few characters
for East European languages and a few typographic characters.
Masi
More information about the TYPO3-dev
mailing list