简体   繁体   中英

Java string encoding(getBytes not working)

Now I have a return message in Chinese from API, it used big5 to encode. Unfortunately, my web page used UTF-8 , so it cant't show properly.

I google this question many times, so I tried different getBytes function many times , and I don't want to use file system to handle it as far as possible. So can anyone supply an effective solution to me?

My JDK version is 1.7, and sorry that this version can't change in this project.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM