Re: mysqlIndexerTest.test_unicode fails for me

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Fri, May 01, 2020 at 12:39:54AM -0400, John P. Rouillard wrote:
> >I see, how about making the database encoding for mysql a config-item
> >which defaults to utf-8 and stating in the documentation for people
> >upgrading that they have to set this if they have a different database
> >encoding? I'd voluteer to do that if someone looks over my documentation
> >:-)
> 
> I would suggest three values for the setting if we go this route:
> 
>   default
>   latin1
>   utf8

More or less, I've implemented this but if the given config option is
not 'default', the value is passed literally to mysql. So other legacy
encodings are possible, too.

> default chooses utf8 if python3, latin1 if python2 and is the default
> value for the setting.

No. This makes the regression test fail for me with python2, both if I
specify 'latin1' or 'default'. It seems the indexer requires utf-8 to
work. So I'm using the same default of utf8 for both, py2 and py3.

> The admin can explicitly choose one of the other two which are the
> default values for older or newer mysql libraries/servers. I don't
> think there is value in permitting any other values for the charset.

See above, the user can insert any valid charset and has to know what
he/she is doing.

Note that I didn't document the legacy reasons why one would want to set
this to anything different from utf8, I simply don't know enough about
the inconsistent databases you can have with mysql to write a sensible
section on that.

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.