Date: Sat, 30 Aug 2025 01:43:24 -0400
On Fri, Aug 29, 2025 at 9:28 PM Oliver Hunt via Std-Proposals
<std-proposals_at_[hidden]> wrote:
>
>
>
> On Aug 26, 2025, at 6:30 PM, Thiago Macieira <thiago_at_[hidden]> wrote:
>
> Would you be able to find out how Swift implements collation? I don't know
> where to begin the search. For Rust, it appears to be ICU4X [1] which is a
> full reimplementation of ICU4C in Rust.
>
>
> What do you mean by collation here? (What is the context?)
Collation is a complex Unicode operation for doing sorting of strings
(https://www.unicode.org/reports/tr10/).
The question being asked is whether Swift's collation support does
this operation natively on UTF-8 strings or if it internally converts
them to UTF-16 and then does collation.
> Separate from this (which I’m trying to find an answer to), you’ve made comments about everything using utf16/ucs2 referencing apple platforms. We consider every utf16/ucs2 api to be legacy and all new APIs for years at this point (including the filesystems) are expected to be utf8. UTF16 is not something we have any interest in adding anywhere new.
>
> (I did just look at the thread title again, and I’m still confused about how this went from floating point aliasing to utf16)
It's because `char8_t` can alias with `char`, which led to a
discussion on the validity of using `char8_t`, etc.
<std-proposals_at_[hidden]> wrote:
>
>
>
> On Aug 26, 2025, at 6:30 PM, Thiago Macieira <thiago_at_[hidden]> wrote:
>
> Would you be able to find out how Swift implements collation? I don't know
> where to begin the search. For Rust, it appears to be ICU4X [1] which is a
> full reimplementation of ICU4C in Rust.
>
>
> What do you mean by collation here? (What is the context?)
Collation is a complex Unicode operation for doing sorting of strings
(https://www.unicode.org/reports/tr10/).
The question being asked is whether Swift's collation support does
this operation natively on UTF-8 strings or if it internally converts
them to UTF-16 and then does collation.
> Separate from this (which I’m trying to find an answer to), you’ve made comments about everything using utf16/ucs2 referencing apple platforms. We consider every utf16/ucs2 api to be legacy and all new APIs for years at this point (including the filesystems) are expected to be utf8. UTF16 is not something we have any interest in adding anywhere new.
>
> (I did just look at the thread title again, and I’m still confused about how this went from floating point aliasing to utf16)
It's because `char8_t` can alias with `char`, which led to a
discussion on the validity of using `char8_t`, etc.
Received on 2025-08-30 05:43:38