MySQL encoding, encoding in spring configuration, Struts Chinese

Source: Internet
Author: User

Three encoding problems today

1. MySQL stored and removed data garbled, because the new database does not support Chinese, modify the database code to GBK or UTF-8

2. to configure data connections in spring, you must specify the data encoding in jdbcurl:

JDBC: mysql: // 127.0.0.1: 3306/auction? Useunicode = true & amp; characterencoding = GBK

Note that this XML file cannot be directly used, but the transferred & amp;

3. We recommend that you use UTF-8 for Chinese encoding in struts because of Ajax. If you use GBK for a discount, see

Http://www.blogjava.net/errorfun/archive/2006/12/30/91000.html

Http://blog.csdn.net/feng_sundy/article/details/139647

Ultraedit does not handle all kinds of codes well. notepad ++ does well in processing. In most cases, the codes can be correctly identified and can be freely converted. If you do not know the encoding format, use Notepad ++ to open it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.