It's been a long day. I'm not sure if I'm overlooking something, or if there isn't an easy answer to my problem.
Here's my Scenario:
In my attempts to re-encode these Strings, I end up with either '?' replacements for the foreign characters, the 2nd Unicode Byte, or both Unicode bytes being sent.
Is there a simple way to take this incoming data that uses 2 bytes to describe these Latin-1 code page characters and encode them as ISO-8859-1 Bytes?
On the reader side you need something like:
new InputStreamReader(underlyingInputStream, "UTF-8")
On the writer side:
new OutputStreamWriter(underlyingOutputStream, "ISO-8859-1")
Then you should be able to read the incoming UTF-8 encoded characters, and write them as ISO-8859-1 encoded characters.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.