Subject: Re: bug#74155: upcasing strings doesn’t respect standard-case-table
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sat, 16 Nov 2024 15:42:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked]
> Date: Fri, 01 Nov 2024 16:07:38 +0200
> From: Eli Zaretskii <[email-masked]>
> 
> > 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" <[email-masked]>
> > 
> > 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 "ß")
>   => "ẞ"

No further comments within 2 weeks, so I'm now closing this bug.