Re: UTF-8 support
| From: | Naz Gassiep | Date: | Sat, 04 Aug 2007 15:42:28 +0000 |
| Subject: | Re: UTF-8 support | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-260181@lists.php.net to get a copy of this message | ||
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 <naz@mira.net> 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