[issue19459] Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS

STINNER Victor report at bugs.python.org
Thu Oct 31 12:24:45 CET 2013


STINNER Victor added the comment:

I found three georgian encodings:

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-PS;h=64615ff4344d74ea0c70cfd7a6c6c8019afb884e;hb=HEAD

https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/charmaps/GEORGIAN-ACADEMY;h=9dc1bc9e782e9fe6092a00daf1a75274fd6dd738;hb=HEAD

http://tools.ietf.org/html/draft-giasher-geostd8-00

The first one ("GEORGIAN-PS") is probably the most accurate because it is the one included in the GNU libc.

Could you please try to copy attached georgian_ps.py file into /usr/lib64/python3.3/encodings/ (or /usr/lib/python3.3/encodings/ for 32-bit Linux)?

Then try to print georgian letters using:

   print(bytes(range(0xc0, 0xe6)).decode("GEORGIAN-PS"))

Please give me also your locale encoding:

   import locale; print(locale.getpreferredencoding())

@Caolán: Do you know the GEORGIAN-ACADEMY encoding? It doesn't look to be used by any glibc locale.

On my Fedora 18, I have 3 georgian locales:

* ka_GE.georgianps: locale encoding GEORGIAN-PS
* ka_GE: locale encoding GEORGIAN-PS
* ka_GE.utf8: locale encoding UTF-8

You can workaround this issue by switching your locale from ka_GE.georgianps to ka_GE.utf8.

----------
Added file: http://bugs.python.org/file32431/georgian_ps.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19459>
_______________________________________


More information about the Python-bugs-list mailing list