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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 09 Mar 2025 08:12:07 +0200

> From: 张海 <[email-masked]>
> Date: Sat, 8 Mar 2025 12:43:09 -0800
> Cc: [email-masked]
> 
> > I cannot reproduce these problems, but then I don't have access to a
> > system with gnome-console.
> >
> > Can someone please reproduce these display issues and debug them?
> 
> 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.

That rings a bell.  What happens if, before turning on whitespace-mode
for the first time in a session, you customize the variable
cjk-ambiguous-chars-are-wide to the nil value?  This must be done
either via setopt or interactively via customize-option, not via setq.
Does the problem go away if you do that, and then turn on
global-whitespace-mode?