[Fwd: Re: [PHP] Character set problems]
| From: | Ryan Yagatich | Date: | Fri, 04 Apr 2008 13:05:48 +0000 |
| Subject: | [Fwd: Re: [PHP] Character set problems] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-272521@lists.php.net to get a copy of this message | ||
Forwarding back to the list, since I'm one of those evil people that
uses HTML to write email :)
-------- Original Message --------
Robert Cummings wrote:
<snip>
>> So, based on the headers I'm using, and the myphpAdmin settings, is there something
>> I'm missing? I guess I was assuming since the headers are set for utf-8, and the "MySQL
>> charset = UTF-8 Unicode (utf8)", that everything would be compatible.
>>
>
> Do you have this in your php.ini?
>
> default_charset = "utf-8"
>
> Or if you want... the following in a .htaccess or virtual host config:
>
> php_value default_charset utf-8
>
> You can even manually output it from within your PHP code:
>
> header( 'Content-Type: text/html; charset=utf-8' );
>
> Cheers,
> Rob.
>
This will fix it in PHP, but may not fix it for any .html file that's on
the server -- even with the appropriate meta tags, check apache's
'AddDefaultCharset' setting too.
Regards,
Ryan Yagatich
--
Pantek, Inc. - http://www.pantek.com/ - info@pantek.com
+1-877-LINUX-FIX - Expert Open Source Technical Support