By now, Unicode merge into the public tree has taken place. How do you
get started?
1. Take a deep breath.
2. Download and build ICU 3.4.
Location:
http://www-306.ibm.com/software/globalization/icu/downloads.jsp
Extract and cd into icu/source. Execute configure (replacing
/usr/local with your prefix):
./configure --prefix=/usr/local --disable-threads --enable-extras
--enable-icuio --enable-layout
make and make install
2. Update to PHP CVS HEAD (cvs upd -dPA) or better, do a clean
check-out.
3. Run ./buildconf.
4. Run ./configure and use --with-icu-dir=<dir> if you put ICU in a
non-standard location.
5. Hopefully it configures without a problem.
6. Cross your fingers (better, cross your toes too) and run 'make'.
7. Once the smoke dissipates (and if you're on Powerbook, once it cools
down from nuclear to just melting hot), you can continue.
Since you have not turned unicode_semantics switch on, you should be
able to run all the old scripts. If you'd like to dabble in the Unicode
land, the suggested way to configure for it is something like this:
unicode_semantics = on
unicode.runtime_encoding = iso-8859-1 (or your favorite one)
unicode.script_encoding = utf-8
unicode.output_encoding = utf-8
unicode.from_error_mode = U_INVALID_SUBSTITUTE
unicode.from_error_subst_char = 3f
Now you can get your hands dirty.
If you'd like to see how certain functions have been upgraded to
accommodate Unicode and binary types, check out substr(), explode(),
trim(), str_repeat(), and strlen().
ICU API reference is at http://icu.sourceforge.net/
There is a new 'make' target called 'utest' - it is supposed to turn
unicode_semantics switch on and run all the tests. I don't think it
will quite work, due to changes in the streams and some other things,
so that might be the first thing to get fixed.
A writeup about new APIs and function upgrade guidelines will be coming
up, but not today, because you need time to digest this and I need time
to recover. :-)
Have fun,
-Andrei
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php