• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cp1252 encoding in XML

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
None of the parsers are able to parse xml file with Cp1252 encoding. Why the support is not there?
Any parser with ability to do so ???
 
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I might ask, what does that encoding stand for? I've seen it before when doing some EJB packaging but never really got around to knowing what it is.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is the MS-Windows codepage for WinLatin1.
http://czyborra.com/charsets/codepages.html
 
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI,
I don;t think you can use CP1252. Try using UTF8 in your endoing attribute. If it not possible I think you can't parse uning this encoding since this is not registered in IANA.
Please refer this URL.
http://manuals.sybase.com/onlinebooks/group-ep/exg0200e/devgde/@Generic__BookTextView/8765
Thanks.

------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is encoding and why is it important? Most documents I've seen, regardless of encoding, basically only contain the characters on the keyboard. Am I comparing apples and oranges?
 
Prashant, Kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After all character is stored in form of bytes. Different encoding stores it in different pattern of bytes (coarsly speaking). Reading the stored bytes, with the "encoding" which was used to save it, will correctly represent character.
You do not notice it normally because most of the time you are dealing with Latin character set. Encoding is important when you are dealing with characters of other languages.
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok, I get it a little bit. Thank you for replying. So generally, I wouldn't have to worry about encoding because I'm not using any other language. Thanks for the tip.

Originally posted by Prashant, Kumar:
Encoding is important when you are dealing with characters of other languages.


 
L Goundalkar
Ranch Hand
Posts: 395
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Please refer this URL.
http://www.w3schools.com/xml/xml_encoding.asp
Thanks.
------------------
L Goundalkar
lggoundalkar@hotmail.com
Sun Certified Programmer for Java 2 Platform
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Gee, everything seems to be at w3schools! Thanks for the link
 
Stanley Tan
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read the article and I don't get it. What is Unicode? and what is UTF-8 and UTF-16? The article also says save the XML file without encoding information. What if I don't have Windows 2000? What other editors support Unicode?
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
The requirement is that the characters in czech is supposed to be read and with no manipulation it has to be printed to thrown to the browser.
I am using Jaxp, Crimson parser's document.parse method to parse the doc. "Document xmlDocument = DocBuilder.parse(xmlFile);" - xml file is a statc file containing the xml content in czech. The problem is that, immediately when I try to write the characters read to another file, the characters seem to be corrupted.
Question is how these spcl chars need to be handled..? It will be highly appreciable if someone can come up with any suggestion inluding if it is a limitation with Crimson or with any method to solve this.
Many Thanks
ak
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic