在cmd里运行mysql,显示中文乱码
发布网友
发布时间:2022-04-23 02:57
我来回答
共2个回答
热心网友
时间:2022-04-07 16:17
charset gbk;
使用charset命令即可,
mysql> charset utf8;
Charset changed
mysql> select * from tb_ddz;
+-----------+-----------------+------+---------------------------+------+------+-------+
| ip | nick | sex | imgsrc | win | lose | score |
+-----------+-----------------+------+---------------------------+------+------+-------+
| 127.0.0.1 | 鐢?鐢? | man | img/DMPhotoBk.png | 0 | 0 | 100 |
| 127.0.0.2 | 姝﹁棨娓告垙 | man | photo/姝﹁棨娓告垙.png | 0 | 0 | 100 |
| 127.0.0.3 | 娴烽┈璧栦汉 | man | photo/娴烽┈璧栦汉.png | 0 | 0 | 100 |
| 127.0.0.4 | 鍩庝箣鍐呭厕涔? | man | photo/鍩庝箣鍐呭厕涔?png | 0 | 0 | 100 |
+-----------+-----------------+------+---------------------------+------+------+-------+
4 rows in set (0.06 sec)
mysql> charset gbk;
Charset changed
mysql> select * from tb_ddz;
+-----------+------------+------+----------------------+------+------+-------+
| ip | nick | sex | imgsrc | win | lose | score |
+-----------+------------+------+----------------------+------+------+-------+
| 127.0.0.1 | 男 生 | man | img/DMPhotoBk.png | 0 | 0 | 100 |
| 127.0.0.2 | 武藤游戏 | man | photo/武藤游戏.png | 0 | 0 | 100 |
| 127.0.0.3 | 海马赖人 | man | photo/海马赖人.png | 0 | 0 | 100 |
| 127.0.0.4 | 城之内克也 | man | photo/城之内克也.png | 0 | 0 | 100 |
+-----------+------------+------+----------------------+------+------+-------+
4 rows in set (0.00 sec)
mysql>
热心网友
时间:2022-04-07 17:35
这个你jboss运行环境不是utf-8追问你指的是?