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

Re: what type of encoding?

Subject: Re: what type of encoding?
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 14 Jan 2002 13:50:46 -0700 (MST)
type of encoding
rafael vazquez wrote:
> Can anybody say me what type of encoding should I use for adding characters 
> such as: á, é, í, ó, ú (spanish apostrofe).

It is impossible to answer your question because you don't explain
what problem you are having.

In an XML document (which includes all XSLT documents), the encoding
declaration in <?xml version="1.0" encoding="..."?> tells the XML parser
that is reading the document to convert the bytes of the document to
Unicode characters according to a mapping table / conversion scheme that
has a name like iso-8859-1 (1 byte per character, 256 characters
possible), utf-8 (1 to 4 bytes per character, all 1.1 million Unicode
characters possible), us-ascii (1 byte per character, 96 characters
possible), and so on. The name you choose must be the *actual* encoding of
the file in which it appears. The characters, after being converted from 
bytes, are fed to the application (the XSLT processor or whatever the XML 
parser is being used by).

In an XSLT document, you might have a line like <xsl:output method="html"
encoding="..."/> which tells the XSLT processor that when it is done
creating the result tree (essentially a virtual XML document that your
stylesheet provides rules for creating), that it should serialize that
tree in the HTML syntax, and to map the characters of that syntax to bytes
using a particular mapping table / conversion scheme. This can be whatever
encodings your XSLT processor supports for output.

The characters you are asking about are in the range covered by
windows-1252, iso-8859-1, utf-8, and utf-16.

If you see/type these characters directly in your document with a dumb
text editor that does not give you a choice of encoding when saving, then
it probably uses your system's default encoding, which is probably
windows-1252 or iso-8859-1 or something similar (1 byte per character).

This should be somewhat helpful information for you.

   - Mike
____________________________________________________________________________
  mike j. brown, fourthought.com  |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  personal: http://hyperreal.org/~mike/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

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
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.