* bug#74155: upcasing strings doesn’t respect standard-case-table
@ 2024-11-01 12:33 Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-01 14:07 ` Eli Zaretskii
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-11-01 12:33 UTC (permalink / raw)
To: 74155
Hi all, quick bug report.
As of 2017 (I believe), the capital eszett (ẞ) was adopted into the
German alphabet as the uppercase variable of ß which was previously (and
which still can be) uppercased to ‘SS’. Since I prefer to use the newer
ẞ to the older SS, I have the following line in my configuration:
(set-case-syntax-pair ?ẞ ?ß (standard-case-table))
When working with characters, this behaves as intended:
(upcase ?ß)
⇒ ?ẞ
However when working with strings, it doesn’t:
(upcase "ß")
⇒ "SS"
The same goes for the ‘upcase-word’ and ‘upcase-dwim’ functions which
still upcase ß to SS. It seems that whatever code that is handling
case-conversions for multi-character inputs is not respecting the current
case table.
— Thomas
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#74155: upcasing strings doesn’t respect standard-case-table
2024-11-01 12:33 bug#74155: upcasing strings doesn’t respect standard-case-table Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-11-01 14:07 ` Eli Zaretskii
0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-11-01 14:07 UTC (permalink / raw)
To: Thomas Voss; +Cc: 74155
> Date: Fri, 01 Nov 2024 13:33:13 +0100
> From: "Thomas Voss" via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> As of 2017 (I believe), the capital eszett (ẞ) was adopted into the
> German alphabet as the uppercase variable of ß which was previously (and
> which still can be) uppercased to ‘SS’. Since I prefer to use the newer
> ẞ to the older SS, I have the following line in my configuration:
>
> (set-case-syntax-pair ?ẞ ?ß (standard-case-table))
>
> When working with characters, this behaves as intended:
>
> (upcase ?ß)
> ⇒ ?ẞ
>
> However when working with strings, it doesn’t:
>
> (upcase "ß")
> ⇒ "SS"
>
> The same goes for the ‘upcase-word’ and ‘upcase-dwim’ functions which
> still upcase ß to SS. It seems that whatever code that is handling
> case-conversions for multi-character inputs is not respecting the current
> case table.
This is a feature: characters which have the 'special-uppercase'
property defined for them by the Unicode Standard use their special
upper-case rules that override the case-table. If you don't want
that, force the special-uppercase property of ß to be nil:
(upcase "ß")
=> "SS"
(put-char-code-property ?ß 'special-uppercase nil)
(upcase "ß")
=> "ẞ"
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-11-01 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 12:33 bug#74155: upcasing strings doesn’t respect standard-case-table Thomas Voss via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-01 14:07 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).