[TYPO3-50-general] UTF-16

Robert Lemke robert at typo3.org
Wed Nov 8 10:38:00 CET 2006


Hi folks,

after getting more into the details of PHP6 and hearing a talk about the 
   Unicode features at the PHPconference Karsten and I discussed if it 
makes sense to a) let TYPO3 5.0 base on PHP6 and b) use UTF-16 everywhere.

Why?

Well, the preview release of PHP6 is planned for end of this year 
already and it comes with many features we don't want to miss 
(especially the Unicode features - we dont' want to rewrite all our 
scripts in a year from now, do we?). If you don't know about them yet, I 
recommend reading the slides of Derrick [1].

And choosing UTF-16? PHP6 works with UTF-16 internally. That means every 
other character set must and will be converted by PHP - which takes 
additional time. It is therefore recommended to use UTF-16 for your data 
already.

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.

We can use UTF-8 for our files, no problem - we just have to start our 
files like that:

    <?php
       declare(encoding = 'utf-8');
       ...

However, PHP will then have to convert the file.

What do you think? Use PHP6? Use UTF-16 for the PHP files or UTF-8?

Greetings from the PHP conference (nerding lounge),

robert


[1] http://www.derickrethans.nl/talks.php



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