Re: PHP support of Unicode?

From: Date: Sat, 03 Oct 2009 16:58:36 +0000
Subject: Re: PHP support of Unicode?
References: 1  Groups: php.i18n 
Request: Send a blank email to php-i18n+get-1326@lists.php.net to get a copy of this message
Gunnar Vestergaard wrote: > When using PHP, writing content in my local language and my neighbouring > contries' language, ISO 8859-1 has been sufficient as a character > encoding. But using PHP with other languages, is that possible? I mean, > does PHP support Unicode at present time? As I understand it, the > following statement is true: > "PHP supports Unicode only as long as it is encoded as UTF-8" > > Is that correct, or does PHP also support UTF-16? It depends what you are doing. PCRE, our regex library, only speaks UTF-8 and there are functions like json_encode() that assume utf-8 as well. If you are just doing pass-through stuff, you can use whatever you want. It is only if you want to manipulate the text in some manner that you need to worry about the encoding. -Rasmus

« previous php.i18n (#1326) next »