String code in Java
How to read the UTF-8 string correctly, if currently locale is not UTF-8:
Use the getBytes:
strInput.getBytes("UTF-8")
And you can wrap it in the input stream, for example:
new ByteArrayInputStream(strInput.getBytes("UTF-8"))
Use the getBytes:
strInput.getBytes("UTF-8")
And you can wrap it in the input stream, for example:
new ByteArrayInputStream(strInput.getBytes("UTF-8"))

0 Comments:
Post a Comment
<< Home