This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes [code]String str = Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

[code]String str = "\u0A85\u0abf\u0ab5"; byte[] str1 = str.getBytes("UTF-8"); str = new String(str1)

Lee Mark
Ranch Hand

Joined: Mar 05, 2009
Posts: 46



this code works with ubuntu (jdk1.6) ..
and is shows boxes (which shows only fonts are left now to install)

while in x machine (jdk 16)
it gives me "???" which shows that charset encoding is not done in proper way..


how can i resolve this..???

please do reply .
its urgent
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19230

Please Use One Thread Per Question. Let's continue here.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: [code]String str = "\u0A85\u0abf\u0ab5"; byte[] str1 = str.getBytes("UTF-8"); str = new String(str1)
 
Similar Threads
problem with charset encoding
Unicode CSV file.
string reader to inputstream
Sevlet encoding for non UTF-8 characters
Garbage Collection, which line?