php-i18n Digest 11 Oct 2001 17:54:16 -0000 Issue 87
Topics (messages 196 through 196):
PHP Unicode support using ICU/xIUA
196 by: Carl W. Brown
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
About a year and a half ago I developed code to enable PHP3 to support
Unicode using ICU. These was some initial interest but it died fast so I
did not look into what it would take to develop a PHP4 solution. The
original problem was adding UTF-16 (UCS-2) support to PHP. In the mean time
I have perfected the ICU interface code and have recently made it available
as open source code.
It is thread safe cross-platform and not only supports all forms of Unicode
(UTF-8, UTF-16 & UTF-32) but it supports code page data with the same code.
It is great for browsers because it can use the same functions to process
code page and Unicode data dynamically so that the code does not change if
you are using UTF-8 for one browser and EUC-JP for another. It has new
functions to make PHP charset handling easier. No there is no need to add
16 bit data types to PHP.
I added the Unicode support to PHP3 but making it a semi-resident module.
It also required some minor changes to the HTTP header processing. With the
new xIUA code the changes to PHP are far less. It also make PHP thread safe
in that each thread can have different locales. This is something that
setlocale does not provide.
Carl
--- End Message ---