This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Unicode character Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Unicode character" Watch "Unicode character" New topic

Unicode character

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
I am having string from server:
My Client programs reads this as normal ascii characters. I have to display kanji characters.
How Can I convert this string to unicode and kanji characters?
Please let me know

Joined: Jul 19, 2001
Posts: 8

try this
Adrian Ferreira
Ranch Hand

Joined: May 29, 2000
Posts: 118
It depends of the encoding your JVM is using.
From API:
"The default encoding is determined during virtual-machine startup and typically
depends upon the locale and encoding being used by the underlying operating system."
In some encoding, this sequence does not map to what you need.
This example may help you when trying to find the encoding you look for. After, you
can change this and convert using your encoding.

Let me know if you have any problem.
Hope it helps,
wood burning stoves
subject: Unicode character
It's not a secret anymore!