[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#934928: win32-loader FTBFS on stable - any idea ?



Control: clone -1 -2
Control: reopen -2 src:nsis
Control: retitle -2 NSIS: Farsi translation contains impossible conversions (YEH to CP1256)
Control: tags -2 upstream

Le samedi, 24 août 2019, 11.52:53 h CEST Simon McVittie a écrit :
> > Unable to convert processed string "نوشتن ممکن نیست: " to codepage 1256
> 
> That string appears to be part of the Farsi (fa) translation of nsis,
> found in "Contrib/Language files/Farsi.nlf" in nsis_3.04-1. It is indeed
> not possible to convert it to Windows codepage 1256:
> 
>     $ python3
> 
>     >>> "نوشتن ممکن نیست".encode('cp1256')
> 
>     Traceback (most recent call last):
>       File "<stdin>", line 1, in <module>
>       File "/usr/lib/python3.7/encodings/cp1256.py", line 12, in encode
>         return codecs.charmap_encode(input,errors,encoding_table)
>     UnicodeEncodeError: 'charmap' codec can't encode character '\u06cc' in
> position 12: character maps to <undefined> $ unicode U+06CC
>     U+06CC ARABIC LETTER FARSI YEH
> 
> (I don't know whether converting this string to CP1256 is an appropriate
> thing to be doing.)
> 
> If that's the problem, maybe it would be possible to work around this by
> adjusting or disabling the Farsi translation, or by replacing the use of
> CP1256 with UTF-16 or something?

Indeed. According to this thread on unicode-ml in 2001 [1], this seems to
only be supported in "not-exactly-CP1256" old Windows environments.
There's a similar bug in Pidgin [2], which brings the following comment [3]:

;;  As this file needs to be encoded in CP1256 and CP1256 doesn't support U+06CC
;;  and U+0654 characters, I have removed all U+0654 characters and replaced U+06CC
;;  with U+064A in the middle of the words and with U+0649 at the end of the words.
;;  The Presian text will display correctly but the encoding is incorrect.

It seems they entirely disabled persian translation for their installer now [4].

So; it seems to me that this is something that should be addressed in
NSIS (upstream), so cloning and reassigning, so that we have a reference bug to
point to.

Cheers,
    OdyX

[1] https://unicode.org/mail-arch/unicode-ml/y2001-m10/0197.html NSIS
[2] https://developer.pidgin.im/ticket/2573
[3] https://developer.pidgin.im/attachment/ticket/2573/persian.2.nsh
[4] https://bitbucket.org/pidgin/main/src/7c5b54ec931b03b9354e0d2fffcac40b13e4aaa5/pidgin/win32/nsis/create_nsis_translations.pl#lines-110

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: