sqlparse
sqlparse copied to clipboard
SQL statements and comments that contain Chinese writing are garbled

Thanks!
Do you have an example to reproduce this issue (preferably text, not as an image). There's at least on test that actually checks that chinese characters are handled properly: https://github.com/andialbrecht/sqlparse/blob/master/tests/test_cli.py#L76
here have an example
use `test_sql`;
show databases;
describe `student2`;
-- drop table `student2`;
create table `student2`(
`student_id` INT ,
`name` varchar(20) not null,
`major` varchar(20) unique default '歷史' , -- unique 不重複 , default '歷史'
primary key(`student_id`)
);
insert into `student2` values(1, null,'英文'); -- error
insert into `student2` values(1, '小白','英文');
insert into `student2` values(2, '小黑','英文'); -- error
insert into `student2` (`student_id`,`name` ) values(2, '小黑');
select * from `student2`;
after sqlparse
use `test_sql`;
show databases;
describe `student2`;
-- drop table `student2`;
create table `student2`(
`student_id` INT ,
`name` varchar(20) not null,
`major` varchar(20) unique default '���v' , -- unique ������ , default '���v'
primary key(`student_id`)
);
insert into `student2` values(1, null,'�^��'); -- error
insert into `student2` values(1, '�p��','�^��');
insert into `student2` values(2, '�p��','�^��'); -- error
insert into `student2` (`student_id`,`name` ) values(2, '�p��');
select * from `student2`;