Re: mysqlIndexerTest.test_unicode fails for me

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
I've now exchanged the german and the russian test. The russian version
fails with:
*** UnicodeEncodeError: UnicodeEncodeError('latin-1', u'\u0420\u0423\u0421\u0421\u041a\u0418\u0419', 0, 7, 'ordinal not in range(256)')

Why is it trying to use latin1 for conversion?

The database connection seems to use a latin1 collation:
(Pdb) p self.db.cursor.connection.get_character_set_info()
{'collation': 'latin1_swedish_ci', 'mbminlen': 1, 'mbmaxlen': 1, 'name': 'latin1'}

Anybody more familiar with mysql who can tell me in what configuration I
have to look to fix this?

Note that for Python3 it is OK:
(Pdb) p self.db.cursor.connection.get_character_set_info()
{'name': 'utf8', 'collation': 'utf8_general_ci', 'mbminlen': 1, 'mbmaxlen': 3}

I may have changed some configuration in the depth of time, that system
has been upgraded since at least debian stretch or earlier.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.