[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XML encoding problem

  • From: Mike Brown <mbrown@c...>
  • To: 'Federico Ostermann' <foster@s...>
  • Date: Mon, 13 Nov 2000 13:13:28 -0700

xml encoding
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.