From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#28339: 25.2; Emacs shows ZWNJ character (Zero Width non-Joiner) as Space Date: Mon, 04 Sep 2017 15:11:53 +0300 Message-ID: <83fuc23bp2.fsf@gnu.org> References: <833783yana.fsf@gnu.org> <831snnyaem.fsf@gnu.org> <83lglv2inw.fsf@gnu.org> <83ingy3jvd.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1504527223 25505 195.159.176.226 (4 Sep 2017 12:13:43 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Sep 2017 12:13:43 +0000 (UTC) Cc: 28339@debbugs.gnu.org To: Nima Aryan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 04 14:13:24 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doqFd-0005HC-PB for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 14:13:13 +0200 Original-Received: from localhost ([::1]:58507 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqFj-0000gD-8P for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Sep 2017 08:13:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqFZ-0000fH-Od for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 08:13:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doqFU-0002FE-GJ for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 08:13:09 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39191) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1doqFU-0002Eb-8j for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 08:13:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1doqFS-0007J4-Ex for bug-gnu-emacs@gnu.org; Mon, 04 Sep 2017 08:13:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Sep 2017 12:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28339 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 28339-submit@debbugs.gnu.org id=B28339.150452713628023 (code B ref 28339); Mon, 04 Sep 2017 12:13:02 +0000 Original-Received: (at 28339) by debbugs.gnu.org; 4 Sep 2017 12:12:16 +0000 Original-Received: from localhost ([127.0.0.1]:47872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doqEh-0007Hu-KX for submit@debbugs.gnu.org; Mon, 04 Sep 2017 08:12:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doqEg-0007Hh-3U for 28339@debbugs.gnu.org; Mon, 04 Sep 2017 08:12:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1doqEV-0000lU-VZ for 28339@debbugs.gnu.org; Mon, 04 Sep 2017 08:12:08 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1doqEO-0000e0-VK; Mon, 04 Sep 2017 08:11:56 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2422 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1doqEO-00018a-AT; Mon, 04 Sep 2017 08:11:56 -0400 In-reply-to: (message from Nima Aryan on Mon, 04 Sep 2017 11:43:40 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:136576 Archived-At: > From: Nima Aryan > Date: Mon, 04 Sep 2017 11:43:40 +0000 > Cc: Eli Zaretskii , Kenichi Handa > > It got interesting and I've found a workaround for the issue. display of ZWNJ as SPACE or any other character > is matter of font. Different fonts uses different characters. Default Emacs font shows '[' instead of space > which is better and more readable at least. > > The only minor problem I've seen so far is the irrelevance of displayed character (shown as ZWNJ) to the > 'glyphless-char-display-control' for Persian alphabet. > > I've attached a screenshot which shows different behavior of display for both English and Persian at the same > time. I execute `emacs -q` to launch default Emacs. Then I open Test.text sample attached in previous > emails. Set the `glyphless-char-display-control` to show hex-box. It's clearly shown that The English one is > replaced by a hex-box but the Persian one with a '[' (or SPACE). No matter what the > 'glyphless-char-display-control' the Persian case shows same character. > > Note, To type the ZWNJ for the English text, AB, I used Persian input (A, switch keyboard layout, > SHIFT+Space, switch back to English, B). So when I put ZWNJ between the AB it's shown as hex-box (and > affected by 'glyphless-char-display-control' as expected) but when I type it between Persian characters it's > shown as fixed '[' or 'SPACE' (font based) no matter what the glyphless-char dictates. You don't need to customize glyphless-char-display-control at all for the correct display of ZWNJ in Persian. I pointed to that variable before I knew you were talking about the Persian script. When characters in Persian script are displayed and ZWNJ among them, Emacs combines the ZWNJ character with neighboring characters to produce the correct shaping, as expected by users of Persian. On my system, ZWNJ is not visible at all among Persian text, and that's without any customizations of glyphless-char-display-control. It's possible that the original display was incorrect because the font you were using for Persian characters doesn't support shaping as Emacs expects. In that case, finding a better font and customizing your default fontset to use it for Persian should be the solution.