Subject: bug#76852: 30.1; Regression in whitespace-mode causes display issue under terminal

From: 张海 <[email-masked]>
Date: Sat, 8 Mar 2025 18:53:35 -0800

> Thanks for the reply. I did some further debugging and found out this
> issue also disappears on 30.1 if I set my LANG=en_US.UTF-8 , whereas
> my current env is LANG=zh_CN.UTF-8 . The same issue still exists if I
> set LANG=ja_JP.UTF-8 . (I do have all the three locales enabled in my
> /etc/locale.gen .) So I suspect this might be a regression in 30.1
> (compared to 29.4) about logic handling full/half width characters
> under terminal for the whitespace-mode characters (e.g. middle dot)
> when LANG is a CJK locale.

I want to add some more tests that I did, with en_US.UTF-8 and
zh_CN.UTF-8 enabled in my /etc/locale.gen :

1. env -i TERM=$TERM LANG=zh_CN.UTF-8 emacs -nw -q shows the issue;
2. env -i TERM=$TERM LANG=zh_CN.UTF-8 LC_CTYPE=en_US.UTF-8 emacs -nw
-q doesn't show the issue;
3. env -i TERM=$TERM LC_CTYPE=zh_CN.UTF-8 emacs -nw -q shows the issue
again.

So I believe this is an issue that more precisely happens when
LC_CTYPE is set to a CJK locale.

And I tried the tests above under tty (which uses the kerner default
font) and got the same result. So I'm relatively confident this issue
is unrelated to my fonts now.