Home > database >  Mysql data import gibberish
Mysql data import gibberish

Time:09-30

Have a batch of json data no BOM (utf-8) need to import the mysql database, using navicat import part of the code of the json data happen, could you tell me how to solve this problem

CodePudding user response:

CodePudding user response:

Set the coding format database consistent with json,

CodePudding user response:

refer to the second floor dy_daynight response:
Settings database encoding format consistent with json,

Json text is utf-8 no BOM form, database using utf-8 and utf-8 mb4 tried, all is the result

CodePudding user response:


Mysql installation high version

CodePudding user response:

Utf8 try

CodePudding user response:

The set names utf8;

CodePudding user response:

Reason:

Do not have a unified database, the client code


The database encoding utf8, the client code for Microsoft default the utf8 encoding

Coding is also divided into another database (see the meaning of these codes set email last appendix) :

| character_set_client | utf8 |
06
| character_set_connection | utf8 |
07
| character_set_database | utf8 |
08
| character_set_filesystem | binary |
09
| character_set_results | utf8 |
10
| character_set_server | utf8 |
11.
| character_set_system | utf8 |
12
| character_sets_dir |/usr/share/mysql/charsets/|


To show Chinese normally, so the following three parameters of character set must be consistent, and in accordance with the client's character set


The set character_set_client=character set
The set character_set_connection=character set
The set character_set_results=character set
Or

Haracter - set - server

Character - set - client

character_set_connection

CodePudding user response:

This field, you limit the length more than the length of words will be like this
  • Related