thank you very much first, and I would show you below:
1.the code and query results are shown in the figure.
I make the connection to MySQL without specifying the charset. And the database uses the latin1 charset. In fact, the data stored in this database is with GBK charset, which is used commonly in China Mainland.
2. When I make a query, some errors occur, just shown below.
I know from the figure that the utf-8 codec should be the default charset for pymysql. I fetch data with GBK charset, so the error is reasonable.
3. the question is how I can fetch the right data?
when I use charset GBK , I could get data, but there are wrong characters like '????", which should be Chinese like"山东".