[TYPO3-dev] UTF-8 real support, really?

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Mon May 1 20:34:44 CEST 2006


Martin Koch Andersen schrieb:
> Hi,
> 
> I understand from documentation that ALL I have to do to get a fully 
> UTF-8 driven site is setting $TYPO3_CONF_VARS["BE"]["forceCharset"] = 
> 'utf-8' - and this appears to work.
> 
> But I don't understand why. I mean the MySQL collation is not utf-8 but 
> some latin set.

It's up to the sysadmin to set the DB to (one of) the UTF-8 collations 
YMsql supports.

 > So MySQL functions such as LENGTH gives wrong results
> etc.

TYPO3 (the Core) doesn't use LENGTH etc. If an extension needs it, se above.

 > Also mb_string is not being used - which means most PHP string
> functions can mess up the strings.

No. TYPO3 provides an indepent API for handling charsets (which may be 
configured to use mb_string). It's up to developers to use this API.

Using mb_strings function overload (and autoconversion) features may 
lead to trouble. But I have never tested such a setup.

> So does TYPO3 simply avoid this? Does it convert back and forth between 
> the latin encoding and unicode? And does this not lead to problems in 
> some cases? Like two different utf-8 encoding strings have the same 
> latin value etc.
> 
> Has these things been examined in details?

Yes.

What are you trying to do? Getting an answer if you can use TYPO3 with 
UTF-8? Or are questioning the implementation details?

Masi




More information about the TYPO3-dev mailing list