bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#51292: 27.2; Reversing strings with unicode combining characters


From: Lars Ingebrigtsen
Subject: bug#51292: 27.2; Reversing strings with unicode combining characters
Date: Wed, 20 Oct 2021 10:58:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Howard Melman <hmelman@gmail.com> writes:

>> But it might make sense to add function to tokenize a string into
>> grapheme clusters -- I can see that being useful.  Then the caller can
>> chop and reverse the list of clusters as they wish.
>>
>> `string-tokenize-graphemes'?
>
> I agree that seems potentially useful.

It's not that common to have un-normalised strings, though, and if you
normalise the string first you get

(reverse (ucs-normalize-NFC-string "nai\u0308ve"))
=> "evïan"

as expected.  So I think adding more utility functions here wouldn't be
productive (i.e., I don't think they would actually be useful for
people -- they'd just complicate things for users further).

So I think everything here is basically working as designed in Emacs,
and that the design is fine.  (And that the s-reverse isn't good.)  So
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]