Jason analysis

Time:2021-8-5

Error parsing JSON data: invalid UTF-8 middle byte 0xc5

Problem Description:

When calling someone else’s interface to push JSON data, there is an error parsing Chinese characters.
Jason analysis

resolvent:

Method 1. Add-Dfile.encoding=UTF-8, forcibly set the system file encoding format to UTF-8.
Jason analysis

Method 2. Set character encoding when obtaining the output byte streamparam.getBytes("UTF-8"),getBytes(): the default is to obtain the character code of the operating system, and win is the defaultGBK
Jason analysis