Home > Database > Mysql Tutorial > body text

How to build a printable Chinese database

一个新手
Release: 2017-09-30 10:22:24
Original
1304 people have browsed it

The encoding of character data in general databases is latinl, this does not support Chinese

and the character encoding that supports Chinese is utf-8 Andgbk

If you want the tables in the database to display Chinese, you must specify the character encoding when creating the database

##1 create database bb charset=utf8;

or

1 1 create database bb charset=gbk;

A database called bb is created here. Note that

utf8 here does not have -, only utf8 in the database can be omitted without -

Use show create database bb;You can query the character encoding of the database

You can also use show variables like 'character_set%'; after using the database to query the encoding of various characters in the database

The above is the detailed content of How to build a printable Chinese database. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!