From: Eli Zaretskii <eliz@gnu.org>
To: Joost Kremers <joostkremers@fastmail.fm>
Cc: emacs-devel@gnu.org
Subject: Re: format width specifier and locale
Date: Thu, 24 Feb 2022 08:40:23 +0200 [thread overview]
Message-ID: <83k0dksr6w.fsf@gnu.org> (raw)
In-Reply-To: <87k0dll3pk.fsf@fastmail.fm> (message from Joost Kremers on Wed, 23 Feb 2022 21:02:31 +0100)
> 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?
next prev parent reply other threads:[~2022-02-24 6:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 20:02 format width specifier and locale Joost Kremers
2022-02-24 6:40 ` Eli Zaretskii [this message]
2022-02-24 7:16 ` Eli Zaretskii
2022-02-24 7:54 ` Eli Zaretskii
2022-02-24 8:37 ` Joost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k0dksr6w.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=joostkremers@fastmail.fm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.