Today in the study of MySQL found my code is: latin1 situation, should not support Chinese, although has not tried, let him modify it.Check the default situation first:Mysql> Show variables like '%collation% '; Query commands from the Internet,
The MySQL database is an open-source database that is widely used. The following is a procedure for modifying the character encoding of a MySQL database and converting the character encoding of a table into a Utf-8 method, which a friend can refer
Today, the data is submitted to PHP through the form and then inserted into the database. Web page and PHP encoding format are utf-8, when inserted into the database is also set $this->query ("Set names UTF8;");However, there is a case of reading
View encodingSHOW VARIABLES like ' character_set_% ';Modify the like field in turnFor example set Character_set_results=utf8;Finish modifying the/etc/my.cof fileAdd the following contentEdit/etc/my.cnf,Added in the inside, already have [XXX], in the
Create a database and specify the encodingCreate database ' test ' default character set UTF8MB4 collate utf8mb4_unicode_ciThe browser prints Unicode encoded charactersvarff= ' \u660e\u5929\uff0c\u4f60\u597d \ue115 'Modify a table's fieldsALTER
Welcome to the Linux community forum and interact with 2 million technical staff. The default MySQL encoding is Latin1, which does not support Chinese characters. You must change the default database encoding to gbk or utf8 at noon. 1. You need to
Undefinedclassconstant & #39; MYSQL_ATTR_INIT_COMMAND & #39; I found on the Internet that I want to open pdo. However, all the comments are removed from the configuration file, but the comments cannot be removed. Php5.6 and thinkphp frameworks are
Because the utf8 character set is currently the most suitable character set for conversion between different character sets, although you may not be able to correctly view the content in the database on the command line tool, I still strongly
1. Database code is UTF-8
2. The client code is GBK;
How to insert Chinese Characters
Example:
Create Database mydb;
Use mydb5;
Create Table news ( news_id int not null auto_increment, news_title varchar (100) not null,
There is no theoretical basis as described below, which is purely an experience.
MySQL uses version 4.1 or later, and uses the default for whatever character set it is. You do not need to set MySQL.
Then an example of using GB2312 and UTF-8 is
1. If only the database is converted and the ApplicationProgramSet names should be modified to maintain the original encoding;
2. serialized fields stored in the database. If the application code changes after direct conversion through encoding, it
1, change the client character set: run regedit through Windows Run menu, modify registry
Start-> Run-> rededit
Under Registry Editor-> HKEY_LOCAL_MACHINE-> SOFTWARE->oracle->key_xe->right WINDOW DOUBLE CLICK Nls_la NG-> Change VALUE to
Mysql Chinese garbled solution ideas and processes bitsCN.com
Mysql Chinese garbled text is a common problem, and it is not difficult to solve it. This article will be guided by how to find and solve the problem when I encounter it, to present the
1) when compiling MySQL, a default character set is specified, which is Latin1;
(2)
When installing MySQL, you can specify a default character set in the configuration file (My. INI). If it is not specified, this value is inherited from the value
Today, I read the SQL Server Bible online help to design the following problems during SQL Server 2000 replication. Finally, I came to the conclusion that the SQL database engine cannot correctly parse or not parse the SQL Server database. 1. Create
Copy Code3, PHP or HTML file itself encoding: with EditPlus open PHP file or HTML file, save, select the encoding, if the database and page encoding is GBK, then the code here choose ANSI; If the database and page encoding is Utf-8, then Utf-8 is
Personally, we recommend that you use utf8 as much as possible for the database character set (the HTML page corresponds to UTF-8) so that your data can be migrated smoothly.
Personally, we recommend that you use utf8 as much as possible for the
Mysql sets the default database EncodingIf the encoding method is not selected during mysql installation, the system selects latin1 encoding by default, in the mysql Console window, enter show variables like 'Char % 'to view the default sequence set
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.