[Use has been resolved tomcat server at development time Audio play local music, Chinese garbled / can not find the problem

I. Description of the problem

When you use audio plug, play local music, do not know how to play English songs, Chinese songs will not name, but also constantly being given.
Here Insert Picture Description


Second, the problem analysis

It is easy to speculate, because there is no code or somewhere on the Chinese name for processing results in garbled.
But I do not know exactly where to appear, to engage in a long time. Finally found something tomcat server. tomcat server does not use the correct decoding mode parameters in the analysis, because all I use utf-8, so it is necessary servers in utf-8 to decode, but tomcat server when decoding format is not set, the default is ISO-8859-1 so we need to URIEncoding tomcat server parameter is set to UTF-8.


Third, the problem is solved

Set inside the tomcat server.xml file


<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" URIEncoding="UTF-8" />
Published 32 original articles · won praise 32 · views 40000 +

Guess you like

Origin blog.csdn.net/Evan_love/article/details/89468066