Title: Python does not support the GEORGIAN-PS charset
Type: crash Stage:
Components: Unicode Versions: Python 3.3, Python 3.4
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Caolán.McNamara, ezio.melotti, jwilk, lemburg, loewis, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2013-10-31 10:52 by Caolán.McNamara, last changed 2014-10-28 14:29 by jwilk.

File name Uploaded Description Edit vstinner, 2013-10-31 11:24
Messages (3)
msg201800 - (view) Author: Caolán McNamara (Caolán.McNamara) Date: 2013-10-31 10:52
LANG=ka_GE.georgianps /usr/bin/python3
Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: unknown encoding: GEORGIAN-PS
Aborted (core dumped)

but with python-2.7.5 no crash...
LANG=ka_GE.georgianps /usr/bin/python2
Python 2.7.5 (default, Oct  8 2013, 12:19:40) 
[GCC 4.8.1 20130603 (Red Hat 4.8.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

(fedora 19)
msg201801 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-31 10:56
This bug was initially reported in LibreOffice:
msg201802 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-10-31 11:24
I found three georgian encodings:;a=blob;f=localedata/charmaps/GEORGIAN-PS;h=64615ff4344d74ea0c70cfd7a6c6c8019afb884e;hb=HEAD;a=blob;f=localedata/charmaps/GEORGIAN-ACADEMY;h=9dc1bc9e782e9fe6092a00daf1a75274fd6dd738;hb=HEAD

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 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.
Date User Action Args
2014-10-28 14:29:49jwilksetnosy: + jwilk
2014-10-20 16:50:51serhiy.storchakalinkissue22679 dependencies
2013-10-31 11:37:25serhiy.storchakasetnosy: + lemburg, loewis, serhiy.storchaka
2013-10-31 11:25:06vstinnersettitle: Fatal Python error: Py_Initialize: Unable to get the locale encoding: GEORGIAN-PS -> Python does not support the GEORGIAN-PS charset
versions: + Python 3.4
2013-10-31 11:24:45vstinnersetfiles: +

messages: + msg201802
2013-10-31 10:56:24vstinnersetnosy: + vstinner
messages: + msg201801
2013-10-31 10:52:59Caolán.McNamaracreate