faqts : Computers : Programming : Languages : PHP : Function Libraries

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 17 people (94%) answered Yes
Recently 10 of 10 people (100%) answered Yes

Entry

Why are utf8_encode & utf8_decode in the XML module?
Why are utf8_encode & utf8_decode NOT in the string module?

Aug 2nd, 1999 08:53
Nathan Wallace, Rasmus Lerdorf


Because the actual low-level utf8_encode code is part of the expat
library that implements xml.  As of Apache-1.3.7 these functions are
built into Apache and you can compile PHP simply using --with-xml (as of
3.0.12) and you will have access to these functions.  Since the
functions are already in Apache you are not adding any extra code either
since the code is in there whether you use --with-xml or not.