GNU bug report logs - #41005
problem with rendering Persian text in Emacs 27

Previous Next

Package: emacs;

Reported by: hossein valizadeh <valizadeh.ho <at> gmail.com>

Date: Fri, 1 May 2020 18:34:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #122 received at 41005 <at> debbugs.gnu.org (full text, mbox):

From: Amin Bandali <bandali <at> gnu.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: rpluim <at> gmail.com, valizadeh.ho <at> gmail.com, 41005 <at> debbugs.gnu.org,
 pipcet <at> gmail.com
Subject: Re: bug#41005: problem with rendering Persian text in Emacs 27
Date: Fri, 24 Jul 2020 00:11:30 -0400
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Amin Bandali <bandali <at> gnu.org>
>> Cc: rpluim <at> gmail.com,  valizadeh.ho <at> gmail.com,  41005 <at> debbugs.gnu.org,
>>   pipcet <at> gmail.com
>> Date: Tue, 21 Jul 2020 22:12:19 -0400
>> 
>> >> Lastly, it might be worth mentioning that if I recall correctly, when
>> >> using xfthb with emacs-27, I observe the same issue.  Which may suggest
>> >> that perhaps the issue is related to Emacs's HarfBuzz support.
>> >
>> > But that's exactly the configuration that was fixed...
>> >
>> 
>> It is strange.  I did some more testing.  Whether with xfthb (emacs-27)
>> or ftcrhb (master), it seems like typing in Persian in *scratch* works
>> okay.  However, if I paste (yank) Persian text, e.g. from Wikipedia,
>> into *scratch*, the issue surfaces and yanked text is garbled.  Further,
>> Persian text in Gnus's article-mode and in message-mode is always
>> garbled to begin with.  It does seem like a HarfBuzz issue to me.
>> Please feel free to grab the Vazir font and test for yourself.
>
> Does this happen only with that font, or does it happen with any font
> that supports Persian?
>
> If it's only that font, then I don't think we should try solving this
> in Emacs; please report this to the font developers.
>

It appears to happen with any font supporting Persian/Arabic.  Examples
include DejaVu Sans and Noto Sans Arabic.

>
> If the problem happens with any Persian-supporting font, then please
> tell the details: which page you copy/paste from, what browser did you
> use to copy that text, detailed steps for how to reproduce in Gnus,
> etc.  This bug report described a problem that happened in different
> situation (the Emacs EWW browser), so it's hard to know what exactly
> happens in your case.
>
> Thanks.
>

Examples of pages I copied excerpts from include the front page of the
Persian Wikipedia <https://fa.wikipedia.org>, as well as the Persian
translation of GNU's homepage <https://www.gnu.org/home.fa.html>.  The
issue does not seem to be specific to a particular text, and appears to
occur when pasting any Persian text into a buffer.  As for the browser,
I tried with both GNU IceCat and Emacs's EWW; same results.  I am able
to reproduce by pasting any random Persian text into any Emacs buffer.
In the case of Gnus, simply pressing RET on the subject of an email in
gnus-summary-mode to have it displayed using gnus-article-mode shows the
Persian text in the email body as garbled.

Hope this helps.

                                 * * *

Actually, as I was about to hit send, it /just/ occurred to me to try
with -Q or -q, and in both cases I do not see this bug!  How strange!
I'll start bisecting my Emacs configuration and will report back if I
manage to find the cause.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 4 years and 357 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.