[TYPO3-50-general] UTF-16

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Wed Nov 8 12:12:30 CET 2006

Robert Lemke schrieb:
> The question now is - should we store our PHP files as UTF-16 as well? 
> That would make sense, because of speed and consistancy (TYPO3 5.0 = 
> everything UTF-16) on the other hand it could cause problems if people 
> use badly configured editors.

Some of my editors (Windows) write BOMs which wasn't liked by older PHP. 
Probably PHP6 will treat it correctly.

IIRC UTF-16 uses a two-bytes for each char opening the problem of 
endianness. Is there any prefernce for this?

> Use PHP6?

Given that TYPO3 5 is to me still "only" a vision it makes sense. Zend is 
probably faster in delivering a stable PHP6 than the TYPO3 community with 
rewriting TYPO3.

> Use UTF-16 for the PHP files or UTF-8?

Using UTF-16 will make all files two times biggern then necessary. Roughly 
99.99% of all characters of a PHP file are in the ASCII range.

So I guess that converting from UTF8 to UTF16 takes only minimal amount of 
time in relation to parsing the PHP code itself. My opinion is: no, don't 
use it for PHP files a waste of size and perhaps a problem with editors.

The same question comes when we talk about West-Europan sites. Do I really 
want to store UTF16 in my DB? Maybe TYPO3 doesn't need to handle this. At 
least on Mysql I can have different charsets for client and server. So 
Mysql could transparently deliver UTF16 but store in UTF8.


More information about the TYPO3-project-5_0-general mailing list