Tags: confirmed

It also reproduce with other non-UTF-8 locales.

1. Edit "/etc/locale.gen" and setup non-UTF-8 locale
2. Use non-UTF-8 locale for Calibre
      $ LANG=ja_JP.EUC-JP calibre
      $ LANG=en_US.ISO-8859-15 calibre
3. Segmentation fault

>   If LC_CTYPE=ro_RO then calibre segfaults on startup
>   If LC_CTYPE is unset (or LC_ALL=C) then calibre starts and works normally.

> Locale: LANG=en_GB.UTF-8, LC_CTYPE=ro_RO (charmap=ISO-8859-2), 
> LANGUAGE=en_GB:en

Current Linux system recommends UTF-8 based locale.
"ro_RO" uses legacy encoding "ISO-8859-2" and it's not recommended for
modern Linux systems.
Use UTF-8 based ro_RO locale "ro_RO.UTF-8" to avoids this bug.

1. Edit "/etc/locale.gen" and adds "ro_RO.UTF-8" locale support.
    Use "dpkg-reconfigure locales" command for easy setup.
    It also drops legacy locale support.
     # dpkg-reconfigure locales
2. Use "ro_RO.UTF-8" for Calibre
     $ LC_CTYPE=ro_RO.UTF-8 calibre
     $ LANG=ro_RO.UTF-8 calibre
3. Works well.

> The offcial calibre version 5.43.0 does not segfault on the same machine.
> This is a debian specific issue.

Official calibre uses embedded Python, and not uses system Python.
Embedded Python uses limited locale support, and this avoids locale problems.

--
YOKOTA Hiroshi

Reply via email to