Iain wrote:
[color=blue]
> I'm having a problem with charset encodings that I desparately need some
> help with. I don't even pretend to know the basics about charsets, so
> please forgive my ignorance.
>
> I am transforming XML source into XHTML using an encoding of iso-8859-1
> and when I browse (using Mozilla 1.x) I see strange, accented 'A'
> characters preceeding some characters generated from an entity
> reference. If I use utf-8, things get a lot worse: even my
> characters get prefixed with the accented junk.
>
> My resultant XHTML source has the usual XML preamble at the top,
> complete with encoding specification; however, it doesn't use <meta/> to
> specify the charset -- could this be the cause of my problem?[/color]
What content-type do you send to the browser? If you have server side
scripting then you don't need a meta element but you should send a HTTP
header
Content-Type: text/html; charset=ISO-8859-1
to indidacte the encoding if you send text/html as the HTML parser of a
browser will hardly look at the XML declaration.
If you send the XHTML with an XML content type like
Content-Type: text/xml
then the browser will use the XML parser and that should indeed process any
<?xml version="1.0" encoding="ISO-8859-1"?>
--
Martin Honnen
http://JavaScript.FAQTs.com/