Bugs in recent projects

Problem: When uploading files in java development, there is a problem of garbled characters. When using the upload component of Apache, there will be a lot of garbled characters.

Reason: There is a problem with the commons-fileupload.jar of Apache in the early stage. After extracting the Chinese characters, it is decoded. After submitting, the encoding automatically uses the tomcat default encoding format iso-8859-1. In this way, period, comma, and other special symbols become garbled characters. If the number of Chinese characters is technical, garbled characters will appear, and even numbers will be parsed normally.

Solution: Download commons-fileeup;oad-1.1.1.jar

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324713476&siteId=291194637