Skip to main content

All Questions

Tagged with
0 votes
0 answers
86 views

Python MySQL doesn't encode surrogates for query parameters

Running tried this with both Python3.7 and Python3.8, with mysql-connector-python 8.0.13 and 8.1.0 MySQL 5.7.42 Collation on the database is set to 'utf8mb4_unicode_520_ci' Connection from Python is: ...
TechnoSwiss's user avatar
-1 votes
1 answer
214 views

Storing and displaying emojis with mysqldb and Python Flask

I have a database with a table called posts and I have two fields called title and description. Both title and description can contain emoji characters. The solutions to similar problems told me to ...
Bob's user avatar
  • 575
0 votes
1 answer
1k views

Pymysql UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe3

im using pymysql, Binlog2sql every thing works fine with English characters the connection string im using is conn_setting = {'host': args.host, 'port': args.port, 'user': args.user, 'passwd': args....
FaisalAlsalm's user avatar
0 votes
1 answer
623 views

Double encoding when retrieving data saved to blob in MYSQL

I have a Nested python list containing data such as the one shown longlist. I have the code that makes this list into a json like string then i encode it in order to feed it to the base64.b64encoder ...
oscar's user avatar
  • 13
0 votes
1 answer
119 views

Django returning case sensitive results despite correct database collation and use of icontains

I have the following DRF view: class DictionaryFuzzyView(generics.ListAPIView): queryset = Dictionary.objects.filter(disabled=False,).order_by(Length('simplified').asc()) serializer_class = ...
Steven Matthews's user avatar
1 vote
1 answer
3k views

Effect on data on Changing mysql database from 'utf8' to 'utf8mb4' in django live application

I am serving Django application with MySQL back-end with Apache 2. I have configured the database with character-set set to 'utf8' I want to store emojis as well so I need to change the encoding to '...
Saksham's user avatar
  • 148
0 votes
1 answer
218 views

Python mysqlclient and data on two different servers

On my local machine (MacOS) I have MariaDB 10.4, Python 3.7.4 and mysqlclient 1.4.4. On remote server (FreeBSD) I have MySQL 5.2, Python 3.7.2 and mysqlclient 1.4.4. Database is in utf8 encoding on ...
Serg's user avatar
  • 99
3 votes
3 answers
1k views

Django: Unicode, MySQL and Encodings (latin1, koi8-r)

Django version 2.0. Python 3 My database charset and collation: mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@...
Serg's user avatar
  • 99
1 vote
0 answers
153 views

python3 pymysql fetch non-English data

I am using Python 3.4 with pymysql to load data from MySQL. The problem is I cannot retrieve non-English data. When I run the following code I get UnicodeEncodeError: 'ascii' codec can't encode ...
com's user avatar
  • 2,714
0 votes
0 answers
336 views

Getting "1366 (HY000): Incorrect string value:" after specifying encoding

Sorry I've seen the question answered before but can't seem to solve the problem. I'm trying to properly encode my SQL columns so it will accept emojis: def create_table(): op = '''CREATE TABLE ...
Amon's user avatar
  • 2,971
1 vote
0 answers
81 views

UnicodeEncode error in the process of inserting RSS data into the Mysql database

I am currently working on personal project that make news aggregator. For that, i collected some sources about articles from some sites using Python feedparser lib. Following codes are functions of my ...
Antenna_'s user avatar
  • 147
0 votes
3 answers
37 views

Incorrect text from mariadb via python

I have my mariadb where I have some text on russian language(which I add by INSERT INTO test VALUES(1, "Абвг Деёжзий", "2138712894-213123", true)) And I have my python code: import MySQLdb connection=...
Dima Lukashov's user avatar
0 votes
1 answer
2k views

Wrong encoded characters when I send utf8 encoded characters from pandas to mysql with latin-1 encoding

I'm getting wrong encoded characters when I send utf8 encoded characters from pandas to mysql with latin-1 encoding. This is a sample value I'm getting in mysql: Biquíni This is my code: df....
Filipe Ferminiano's user avatar
2 votes
1 answer
9k views

pyodbc doesn't correctly deal with unicode data

I did successfully connected MySQL database with pyodbc, and it works well with ascii encoded data, but when I print data encoded with unicode(utf8), it raised error: UnicodeEncodeError: 'ascii' ...
J.Z's user avatar
  • 35
0 votes
0 answers
739 views

Use python to query mysql:what encoding and decoding should be used when query condition has Chinese characters

First , below is my mysql server encoding configurations: server1: 1 character_set_client utf8 2 character_set_connection utf8 3 character_set_database utf8 4 character_set_filesystem ...
wuchang's user avatar
  • 3,079

15 30 50 per page
1
2 3 4 5