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!

UTF-8 Encoding

nitul.kukadiaMay 26 2014 — edited May 30 2014

Hi All,

   I have input string in japanese language, I am parsing string in UTF-8 encoding.

 

   String name = new String(japaneseString.getBytes(), "UTF-8");

    I got successfully converted the below japanese string:

    1) アップル

     2) 赤

     3) 世丕且且世两上与丑万丣丕且丗丕

     4) 世世丗丈

But, I got failures in below cases :

1) Input:  ひほわれよう        Output : �?��?��?れよ�?�

2) Input: 存在する               Output: 存在�?�る

It seems from above, some of the japanese characters are not converted properly.

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2014
Added on May 26 2014
9 comments
3,662 views