[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML encoding problem
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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|