Home  >  Q&A  >  body text

中文问题我用的是cmd客户端GBK,为什么都没遇到乱码 ?5.7.15-log MySQL

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;


RJRJ2757 days ago1103

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-10-01 00:43:27

    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.

    reply
    0
  • 常青春

    常青春2017-09-20 22:38:20

    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? ?


    reply
    0
  • Cancelreply