954,518 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem in Unicode Parsing.

I am going to develop a J2ME application, where the application gets the complete dat from an XML file, for this have used kxml parser. And the parsing already done, but the problem arise after parsing, i.e., When I get a String of Unicode for a particular Word, then the application does not display the actual word, rather it displays the complete string of Unicode..
-------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
Flash
--------------------------------------------

String str1 = ParseEvent.getValue("val"); //returns \u0046\u006c\u0061\u0073\u0068
String str2 = "\u0046\u006c\u0061\u0073\u0068";

Now, the problem is--
When I print str1 ,

System.out.println(str1); // Prints Flash
System.out.println(str1.length()); //Prints 5

But when I print str2 i.e.,

System.out.println(str2); // prints \u0046\u006c\u0061\u0073\u0068
System.out.println(str2.length()); //Prints 30

I am really fed up for this, please tell me, why they are doing this?
Any body who have worked or working on Unicode, please give me your email-Id.

My mail-id:: [email]arindam@mob-tech.net[/email]

AS_82
Newbie Poster
6 posts since Feb 2008
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You