On 1/18/25 7:15 AM, Félix Hauri wrote:

hobbit:~$ var='garçon'
hobbit:~$ echo "${var^^}"
GARÇON

But, UTF-8 is a kind of nightmare:

   var1=$'gar\303\247on'
   var2=$'garc\314\247on'

Yes, NFD vs NFC is confusing. But POSIX is pretty clear that these are
different characters that happen to have the same graphical
representation and should be treated accordingly:

"Matching shall be based on the bit pattern used for encoding the
character, not on the graphic representation of the character."

The burden is, unfortunately, on the application writer.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to