@ Jon Ege Ronnenberg <[EMAIL PROTECTED]> :
> I bow for you. You're absolutely right and utf8_decode() was just what I
> needed! Still I don't get why setting charset to UTF-8 doesn't show the
> danish characters correct in a web page then.

It's not something obvious; I wrote an entire article explaining this (but
it's in French) at http://www.uzine.net/article1785.html

in short if your page uses utf-8, it should advertise it in the server
response headers (e.g., in php:
        header('Content-Type: text/html; charset=utf-8');
) and/or as a meta http-equiv inside the <head> of your html page:
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

This is because for most browsers the default charset for web pages (when
they don't advertise which charset they use) is iso-latin. In that case your
danish characters (encoded on two bytes, b1, b2) will look as two iso-latin
characters ("b1" then "b2", which is displayed on screen like "Ä^@") instead
of one two-byte character ("b1b2", displayed as you want it to be).

hope this helps

-- Fil


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to