Unicode generated by toEscapedUnicode method is without spaces

Posted by vishvesha on Stack Overflow See other posts from Stack Overflow or by vishvesha
Published on 2010-03-04T14:06:58Z Indexed on 2010/12/27 3:53 UTC
Read the original article Hit count: 169

Filed under:
|
|
|

For this word ????????????? the Unicode is==> \u0938\u0941\u0916\u091A\u0948\u0928\u093E\u0928\u0940 \u0930\u0940\u091D\u0941\u092E\u0932 \u091C\u093F\u0935\u0924\u0930\u093E\u092E

and look it has spaces before \u0930 and \u091C

But when I am trying in my code

String tempString=Strings.toEscapedUnicode(strString); 

This method to convert to Unicode gives a result without spaces: \u0938\u0941\u0916\u091A\u0948\u0928\u093E\u0928\u0940\u0930\u0940\u091D\u0941\u092E\u0932\u091C\u093F\u0935\u0924\u0930\u093E\u092E

and that's why they are not matching. My 'toEscapeUnicode' method generates Unicode without spaces. I want the spaces, so how to do it?

© Stack Overflow or respective owner

Related posts about unicode

Related posts about utf-8