OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: XML encoding problem

[ Lists Home | Date Index | Thread Index ]
  • From: Mike Brown <mbrown@corp.webb.net>
  • To: 'Federico Ostermann' <foster@sol.info.unlp.edu.ar>
  • Date: Mon, 13 Nov 2000 13:13:28 -0700

Frederico Ostermann wrote:
> 	I'm developing some XML+XSL pages and I'm having a big 
> problem. Whenever I type characters like "í", "ñ", "é";
> something completely extrange goes to the server.
> 	I'm using the ISO-8859-1 character encoding.

Simply declaring in the XML document that you are using ISO-8859-1 means
nothing if you aren't *really* using it. Do you really know what bit
sequences are being written out by your editor or by whatever application is
transmitting the data?

When you type characters on your keyboard, your hardware and OS map the key
codes to bit sequences (encoded characters). Internally it may be using
Unicode/UTF-16 (WinNT, Win2000) or perhaps some 8-bit character scheme /
code page, it doesn't matter. What does matter is this: what is the
application that is sending character data to the server doing with that
data?

You didn't provide much info. Are you using an HTML form? Forms add another
layer of complexity to the equation. The web browser will have already
decoded the HTML according to some character set, and will likely be trying
to map the typed characters into that character set when it bundles
(possibly URL-encodes) and transmits the form data upon submission.
Generally you are OK if you just make sure the form contains the appropriate
<meta> element declaring its charset, but it can still be tricky to diagnose
where something is going wrong. I can say with certainty that if you are
trying to submit XML through an HTML form, you are playing with fire because
there is no guarantee that the encoding declaration in the XML will be
accurate.

That's all I can say without knowing more about what exactly you're doing.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS