Author AndersMunch
Recipients AndersMunch, lemburg, paul.moore, steve.dower, swt2c, tim.golden, zach.ware
Date 2021-02-17.14:02:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> BTW: What is wxWidgets doing with the returned values ?

wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) that uses C setlocale.

What does use getlocale is time.strptime and datetime.datetime.strptime, so when getlocale fails, strptime fails.

> We could enhance this to return None for the encoding instead
> of raising an exception, but would this really help ?

Very much so.

Frankly, I don't get the impression that the current locale preferred encoding is used for *anything*.  Other than possibly having a role in implementing getpreferredencoding.

> Alternatively, we could add "en_DE" to the alias table and set
> a default encoding to use. 

Where would you get a complete list of all the new aliases that would need be to be added?

As the "en_DE" example shows, you'd need all combinations of languages and regions.  That's going to be a very long list.
Date User Action Args
2021-02-17 14:02:57AndersMunchsetrecipients: + AndersMunch, lemburg, paul.moore, tim.golden, zach.ware, steve.dower, swt2c
2021-02-17 14:02:57AndersMunchsetmessageid: <>
2021-02-17 14:02:57AndersMunchlinkissue43115 messages
2021-02-17 14:02:57AndersMunchcreate