Great! Thanks for the answer, that's very helpful. Will trim() work if I
specify charlists in the ASCII range? Not that I ever do, but just curious.
- Naz
Daniel Macedo wrote:
Hi Naz,
Any byte function is NOT safe for UTF-8.
trim() works properly with UTF-8 IF you don't specify the charlist
(second argument). This is because all whitespace characters are in
the ASCII range, and therefore it won't corrupt the UTF-8 string.
The explode() function will handle UTF-8 as long as it's well formed.
This means that if you properly specify UTF-8 delimiters, it doesn't
corrupt the UTF-8 input string.
~ DM
adel escreveu:
http://www.php.net/manual/en/ref.mbstring.php
On 8/3/07, Naz Gassiep <[EMAIL PROTECTED]> wrote:
The functions trim() and explode() appear to be munging multibyte UTF-8
strings. I can't find multibyte safe versions of them in the manual, do
they exist, or do I have to make my own?
- Naz.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php