Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how do create a java string for chinese characters?

807603Dec 20 2007 — edited Dec 21 2007
hi,

漢 ---> in html it represents the chinese character 漢 (and it shows up in the browser correctly).
now i have a java screensaver that scrolls texts across the screen. i tried the following but it didn't work:
String chineseStr = "\\u28450"; // doesn't show the chinese char (converted it to hex but still it didn't work).

so, how do i represent 漢 as a java String object (code example please). do i need a special flag for javac?

please help,
thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2008
Added on Dec 20 2007
3 comments
1,154 views