On 1/18/25 7:15 AM, Félix Hauri wrote:
hobbit:~$ var='garçon' hobbit:~$ echo "${var^^}" GARÇONBut, 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/
OpenPGP_signature.asc
Description: OpenPGP digital signature