Results 1 to 2 of 2
- 04-18-2009, 12:46 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 2
- Rep Power
- 0
Problem when reading non ascii chars
Hi All
I have a requirement here when an XML message is being parsed. Due to some additional enhancement to output XML I went to write a java custom code to add new tags to existing XML. However, as XML message consists of non ascii chars, when entire xml doc read as string, java internal conversions are happening from non ascii to ascii.. this results as some new char(non- ascii) apprearing in target XML. Can any one help me how can I make sure non ascii chars will pass as it is...
Source of XML looks like
<CANDTOWNCITY>Düsseldorf</CANDTOWNCITY>
after parsing it comes as <CANDTOWNCITY>Düsseldorf</CANDTOWNCITY>
my requirement is : data should come as <CANDTOWNCITY>Düsseldorf</CANDTOWNCITY>
Thanks
- 04-18-2009, 04:50 PM #2
Java should work in Unicode internally. Java Strings are Unicode strings. Have you checked the documentation for the methods you are using and that you haven't set the locale no be non-Unicode or something?
Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
Similar Threads
-
Replacing the chars within a string.
By Mayur in forum New To JavaReplies: 2Last Post: 03-27-2009, 04:00 AM -
chars
By whosadork in forum New To JavaReplies: 6Last Post: 10-03-2008, 09:40 PM -
writting extended ascii chars on socket........or Endianness Issue......??
By sachinj13 in forum Threads and SynchronizationReplies: 8Last Post: 09-23-2008, 02:20 PM -
Reading ASCII / Unicode character in Java
By NGRaju in forum New To JavaReplies: 2Last Post: 09-16-2008, 10:02 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks