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 08:40:23 +0200

> From: Joost Kremers <joostkremers@fastmail.fm>
> Date: Wed, 23 Feb 2022 21:02:31 +0100
> 
> While looking into a bug report for a package of mine,[1] it turned out that 
> part
> of the bug is caused by a strange interaction between `format` and the 
> system's
> locale that looks like a bug, but I'd like to ask here first before I submit a
> bug report.
> 
> The following two `format` calls produce identical-length strings when issued 
> in
> an Emacs with `current-language-environment` set to "English" (or, in my case
> "UTF-8"), but when the language environment is set to "Chinese-GBK", the 
> second
> call produces a string that is one character shorter:
> 
>     (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?



reply via email to

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