[TYPO3-dev] Euro sign with utf8
Steffen Kamper
steffen at sk-typo3.de
Thu Feb 14 17:40:46 CET 2008
"Martin Kutschker" <martin.kutschker-n0spam at no5pam-blackbox.net> schrieb im
Newsbeitrag news:mailman.1.1202998684.2202.typo3-dev at lists.netfielders.de...
> 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
thx Masi for the explanation. Charsets and locale are not an easy task to
understand at all, so i'm happy to got some more info about.
Unfortunally with nntpreader i have to deal with a lot of different charsets
too and have to convert them to utf8, so i'm glad you coded the cs library
that helps a lot. But there are some more difficult conversions where i only
got right results with imap_utf8, if i get encodings like this:
=?iso-8859-1?b?THV6b26uMTQ=?= dot CoM
vg Steffen
More information about the TYPO3-dev
mailing list