| View previous topic :: View next topic |
| Author |
Message |
ASararu
Joined: 27 Aug 2009 Posts: 11
|
Posted: Mon Sep 28, 2009 9:03 am Post subject: unicode problem |
|
|
my mobile application is a client to a web service. the web service connects to a DB and has to read some data from there which is in different languages. the problem is reading the non-latin characters from the DB. the web service reads anything that's not latin like this: "??????", and sending this to the mobile application won't solve a thing. I tried to create a String in the mobile application with non-latin charcaters and on the console it still displays ????
so when i try this in the mobile application:
String string="\u0421";
System.out.println(string);
all i get displayed is the question mark.
I even tried it as this and the result wqas the same:
String string="\u0421";
byte[] defaultBytes = string.getBytes();
try {
String roundTrip = new String(defaultBytes, "UTF8");
System.out.println(roundTrip);
}
catch (UnsupportedEncodingException ex) {
ex.printStackTrace();
}
The conclusion is htat neither the webs ervice nor the mobile application can read these characters, but when i tried with a normal java application it worked fine.
Got any clues how to get the web service and mobile application to read those characters? |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|