On Mon, 28 Aug 2006 15:57:17 -0400
mbneto <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I have a php based script that is called from a html page via ajax.
> Everything runs fine except when I use characters such as รก that ends up
> like A!

A browser will display text according the the charset specified in the
HTTP response Content-Type header. That is usually set by the HTTP server
(e.g. Apache AddDefaultCharset and AddCharset). So I suspect that in
your case, your HTTP server is sending charset=ISO-8859-1 whereas the
content is in fact UTF-8 (when one non-ascii character is rendered as
two or three usually garbled characters it's an indication that UTF-8
is being rendered as some 8 bit codepage like ISO-8859-1).

Note that the charset specified in the META tag within an HTML document
is ignored when served over a network. I'm not certain what the charset
in the META tag is for. I suspect it's for caching or when you open an
HTML file from disk perhaps.

Mike

-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to