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

Re: Locale Example for SAX(Sun's XML parser)

  • From: David Brownell <david-b@p...>
  • To: xml-dev@i...
  • Date: Mon, 10 May 1999 07:44:35 -0700

locale example
Lars Marius Garshol wrote:
> 
> * Mi-Jeong Koo
> |
> | I'm a Korean and developing a project using the 'Project X'.
> | I'm trying to process tag names written in Korean characters but I have
> | some problem.
> | Can I get some example codes about locale?
> 
> The SAX Locale shouldn't affect things like that. Which characters are
> allowed in element type names is written is defined in the XML
> recommendation and parsers just have to follow that.
> 
> The Locale is more intended for things like localized error messages
> and so on.

And since Sun doesn't provide a resource with Korean localizations
(a com/sun/xml/parser/resources/Messages_ko.java file), if you set
the Korean locale for diagnostics you'll just see the message IDs
rather than diagnostics in Korean.  (You have source, and could
provide such a resource file if you like.)


> So I would suggest that you look in the XML recommendation to see
> which characters you're allowed to use and then either file a bug
> report, switch parser and/or change to using legal characters.

The usual problems I've seen relate to character encodings.  If you
don't use UTF-8 or UTF-16 (not many editors do, yet :-) then you must
declare the encoding at the beginning of each file, perhaps something
like

    <?xml version='1.0' encoding='EUC-KR'?>

or "ISO-2022-KR" etc.  (Perhaps "cp949", for a PC-oriented encoding?)

The official list of encoding name supported by Java is linked through
the package docs for the parser, at

   http://java.sun.com/products/jdk/1.2/docs/guide/internat/encoding.doc.html

One problem you may have is that some of the standard encoding names
are not recognized, even for encodings which _are_ supported.  A bug
has been filed against the Java i18n support, but I don't know when
the more standard names will get better support.  So if the standard
encoding names don't work, use the ones listed in the URL above.

- Dave

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.