Re: utf-8 in mysql but not outputting as utf-8 on web

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 22, 2005 at 07:01:07PM -0800, jonathan wrote:
> I'm inserting some info into a mysql table which has the charset set  
> to utf-8.
> 
> When I do a select via the command-line from mysql, it looks like this:
> Clams and mussels with Dijon-cr� fra�e-saffron sauce
> 
> assuming this is coming out in your email client ok, it should look  
> good.
> 
> 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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux