RE: [PHP] utf-8 in mysql but not outputting as utf-8 on web
| From: | Denis Gerasimov | Date: | Fri, 23 Dec 2005 06:39:31 +0000 |
| Subject: | RE: [PHP] utf-8 in mysql but not outputting as utf-8 on web | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227836@lists.php.net to get a copy of this message | ||
Hello,
Also the first query that is executed to MySQL server has to be:
SET CHARACTER SET utf8
This will set the character set for current connection to UTF-8 (default is
latin-1).
HTH
Have a great day,
Denis S Gerasimov
Web Developer
Team Force LLC
Web: www.team-force.org
RU & Int'l: +7 8362-468693
email: denis.gerasimov@team-force.org
> -----Original Message-----
> From: Curt Zirzow [mailto:czirzow@gmail.com]
> Sent: Friday, December 23, 2005 9:02 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] utf-8 in mysql but not outputting as utf-8 on web
>
> >
> > On a web page, I set the charset to utf-8 via:
> > header("Content-type: text/html; encoding: UTF-8");
> > as the top-line
>
> you want:
>
> Content-Type: text/html; charset=UTF-8
>
>
> Also, take a look at the php.ini setting:
>
> http://php.net/manual/en/ini.core.php#ini.default-charset
>
>
> I would set that to UTF-8 and not worry about the header calls;
> besides all pages should have some sort charset encoding set.
>
> Curt.
> --
> cat .signature: No such file or directory
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php