I recently learned JSP and used the MYSQL database. But the problem of garbled characters has been bothering me.
I thought that as long as I used one encoding (such as UTF-8) from the page to the database, there would be no garbled characters. As a result, my Chinese was no longer pure garbled characters, but turned into Chinese numbers + English garbled characters.
The resolution process was difficult and took many detours. Finally, I found that the most fundamental reason lies with EMS2007. He himself does not support Chinese well! Directly using EMS2007 to add and modify Chinese data in the database will result in the result being in the form of Chinese numbers + English garbled characters. For example, when entering the data "I love Chinese", the result stored in the database is indeed "I love Chinese ahv". Later I switched to EMS2005 ver3.7.7.1 also found that this version cannot store UTF-8 data. Finally, I used the combination of EMS2005 ver3.7.7.1+GB2312 encoding, and the problem was indeed solved!
If you also encounter garbled characters like "Chinese numbers + English garbled characters", try this method. Of course, if the Chinese characters are displayed in garbled form, it will be easier to solve. You can easily find the answer by searching on Baidu.