{"id":4391,"date":"2015-03-17T18:31:01","date_gmt":"2015-03-17T10:31:01","guid":{"rendered":"http:\/\/rmohan.com\/?p=4391"},"modified":"2015-03-17T18:31:01","modified_gmt":"2015-03-17T10:31:01","slug":"mysql-garbled-several-reasons","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4391","title":{"rendered":"MySQL garbled several reasons"},"content":{"rendered":"<p>MySQL garbled reason is simply the following reasons:<\/p>\n<p>1, it is stored in the database before garbled<\/p>\n<p>2, stored in the database in the process of garbage<\/p>\n<p>3, after the deposit into the database garbled<\/p>\n<p>Want to know where the garbled very simple to print in the background will know.<\/p>\n<p>Now that you know where the problem is, that the solution is very simple:<\/p>\n<p>1, jsp set the encoding is utf-8, to ensure that the background is reached encoding utf-8&#8217;s<\/p>\n<p>2, the database connection plus in such a period of jdbc: mysql: \/\/localhost: 3306\/test? useUnicode=true &amp; characterEncoding = UTF-8 , to ensure that the transfer process is utf-8&#8217;s.<\/p>\n<p>3. Set the database encoded as utf-8, set or Config settings are also lines in my.ini, attention is my.ini in default-character-set to change two places<\/p>\n<p>4, url or easyui garbled, you can try in the tomcat&#8217;s server.xml<\/p>\n<div class=\"cnblogs_code\">\n<pre>&lt;Connector port = \"8080\" protocol = \"HTTP \/ 1.1\"\r\n               connectionTimeout = \"20000\"\r\n               redirectPort = \"8443\" \/&gt;<\/pre>\n<\/div>\n<p>To<\/p>\n<div class=\"cnblogs_code\">\n<pre>&lt;Connector port = \"8080\" protocol = \"HTTP \/ 1.1\"\r\n               connectionTimeout = \"20000\"\r\n               redirectPort = \"8443\" URIEncoding = \"utf-8\" \/&gt;<\/pre>\n<\/div>\n<p>To ensure that no garbage, the first to do the coding to unify, other problems are easy to find out. END.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL garbled reason is simply the following reasons:<\/p>\n<p>1, it is stored in the database before garbled<\/p>\n<p>2, stored in the database in the process of garbage<\/p>\n<p>3, after the deposit into the database garbled<\/p>\n<p>Want to know where the garbled very simple to print in the background will know.<\/p>\n<p>Now that you know where [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4391"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4391"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4391\/revisions"}],"predecessor-version":[{"id":4392,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4391\/revisions\/4392"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}