Re: php utf8 encode
| From: | Gamid Isayev | Date: | Fri, 22 Nov 2002 16:49:10 +0000 |
| Subject: | Re: php utf8 encode | ||
| References: | 1 | Groups: | php.i18n |
| Request: | Send a blank email to php-i18n+get-354@lists.php.net to get a copy of this message | ||
Hello Stanislav,
When i used utf8_encode() echo utf8_encode("&names$i=".$names);Following code works fine for me: <? $name = chr(0xDC); echo utf8_encode("name='$name'"); ?> If you like force browser to switch to UTF-8, you can use header(): <? echo header("Content-type: text/html; charset=utf-8"); $name = chr(0xDC); echo utf8_encode("name='$name'"); ?> BTW, utf8_encode()/utf8_decode() works _only_ for ISO-8859-1, not for win1251. Gamid Isayev