You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To Reproduce
(venv) [cloud@localhost sql_test]$ LANG=C
(venv) [cloud@localhost sql_test]$ mysql -uduan -pAa123456 -e 'INSERT INTO db1.t1 VALUES("文件存储AAAA11111111");'
(venv) [cloud@localhost sql_test]$ python test_sql.py
('\xc3\xa6\xe2\x80\x93\xe2\x80\xa1\xc3\xa4\xc2\xbb\xc2\xb6\xc3\xa5\xc2\xad\xcb\x9c\xc3\xa5\xe2\x80\x9a\xc2\xa8AAAA11111111',)
文件å˜å‚¨AAAA11111111
Schema:
CREATE DATABASE ...
CREATE TABLE ...
Code:
(venv) [cloud@localhost sql_test]$ cat test_sql.py
import pymysql
import os
def test1():
conn = pymysql.connect(host='192.168.226.217', user='duan', password='Aa123456', database='db1', port=3306)
cur = conn.cursor()
sql = 'select * from t1'
count = cur.execute(sql)
ret = cur.fetchall()
for i in ret:
print i
print i[0]
cur.close()
conn.close()
if name == 'main':
test1()
Expected behavior
(venv) [cloud@localhost sql_test]$ mysql -uduan -pAa123456 -e 'SELECT * FROM db1.t1;'
+--------------------------+
| name |
+--------------------------+
| 文件存储AAAA11111111 |
+--------------------------+
Environment
OS: CentOS Linux release 7.8.2003 (Core)
Server and version: 5.5.65-MariaDB MariaDB Server
PyMySQL version: 0.10.1
Additional context
the all os' env LANG is LANG=C, so I have to use LANG=C.
This discussion was converted from issue #963 on February 17, 2021 03:21.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.
Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.
🎥 Watch TMZ Live
TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
Chinese disorder code
To Reproduce
(venv) [cloud@localhost sql_test]$ LANG=C
(venv) [cloud@localhost sql_test]$ mysql -uduan -pAa123456 -e 'INSERT INTO db1.t1 VALUES("文件存储AAAA11111111");'
(venv) [cloud@localhost sql_test]$ python test_sql.py
('\xc3\xa6\xe2\x80\x93\xe2\x80\xa1\xc3\xa4\xc2\xbb\xc2\xb6\xc3\xa5\xc2\xad\xcb\x9c\xc3\xa5\xe2\x80\x9a\xc2\xa8AAAA11111111',)
文件å˜å‚¨AAAA11111111
Schema:
Code:
(venv) [cloud@localhost sql_test]$ cat test_sql.py
import pymysql
import os
def test1():
conn = pymysql.connect(host='192.168.226.217', user='duan', password='Aa123456', database='db1', port=3306)
cur = conn.cursor()
sql = 'select * from t1'
count = cur.execute(sql)
ret = cur.fetchall()
for i in ret:
print i
print i[0]
cur.close()
conn.close()
if name == 'main':
test1()
Expected behavior
(venv) [cloud@localhost sql_test]$ mysql -uduan -pAa123456 -e 'SELECT * FROM db1.t1;'
+--------------------------+
| name |
+--------------------------+
| 文件存储AAAA11111111 |
+--------------------------+
Environment
Additional context
the all os' env LANG is LANG=C, so I have to use LANG=C.
Beta Was this translation helpful? Give feedback.
All reactions