中文问题我用的是cmd客户端GBK,为什么都没遇到乱码 ?5.7.15-log MySQL
RJ
RJ 2017-03-07 14:16:13
0
2
1132
create database my_database charset=utf8;-- 创建数据库utf8
create table my_student(ID varchar(10),name varchar(10),gender varchar(10),age int)charset=utf8;-- 创建表utf8
insert into my_student values('01','Jim','man',18);-- 插入数据
-- 插入中文数据没出现乱码,
insert into my_student values('02','张三','男',20);
select * from my_student;-- 结果也是正常没出现乱码
-- 快捷设置字符集(视频里要设置这个,我没设置下面代码、为什么不出现乱码?)
set name gbk;


RJ
RJ

reply all(2)
数据分析师

Chinese question I am using the cmd client GBK, why do I not encounter any garbled characters? 5.7.15-log MySQL-PHP Chinese website Q&A-Chinese question I am using the cmd client GBK, why do I not encounter any garbled characters? 5.7.15-log MySQL-PHP Chinese website Q&A

Have a look and learn.

常青春

This question is very strange. Do you seem to like garbled characters? , Do you like garbled codes? ? Wouldn’t it be nice to have no garbled characters? ?


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!