emacs-devel
[Top][All Lists]
Advanced

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

Re: format width specifier and locale


From: Eli Zaretskii
Subject: Re: format width specifier and locale
Date: Thu, 24 Feb 2022 09:54:04 +0200

> Date: Thu, 24 Feb 2022 09:16:23 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org
> 
> > Date: Thu, 24 Feb 2022 08:40:23 +0200
> > From: Eli Zaretskii <eliz@gnu.org>
> > Cc: emacs-devel@gnu.org
> > 
> > >     (format (concat "%50s") "Boutet de Monvel's calculus and groupoids I")
> > >     (format (concat "%50s") "Boutet de Monvel’s calculus and groupoids 
> > > I") 
> > > 
> > > The difference between the two string is the apostrophe character: in the 
> > > first
> > > string, it's an ASCII apostrophe, in the second string it's a RIGHT SINGLE
> > > QUOTATION MARK.
> > 
> > If you play with the value of text-quoting-style, does that affect the
> > results in any way?
> 
> Also, in which Emacs version(s) do you see this?

Please ignore these questions.  I see the reason for that behavior:
in the Chinese-GBK language environment, Emacs thinks that the U+2019
character is a double-width character:

  emacs -Q
  C-x RET l Chinese-GBK RET
  M-: (char-width #x2019) RET

This yields 2, not 1.

I'm investigating why we override the default width of U+2019 in this
language-environment (see the function use-cjk-char-width-table in
characters.el and lisp/language/chinese.el that uses it).  Stay tuned
(and maybe file a bug report, so this doesn't get forgotten by any
chance).

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]