News for hackers. Stuff that matters.
Re:Make JDK source code UTF-8 by bmn__ on Wednesday March 01, 2023 @03:07AM (#34979903)
> it also limits discoverability if `fiancee` now is written as `fiancée` […] Searching for the former does not discover the latter.

Let's book this under "falsehoods programmers believe about Unicode".

You can try either the code below or simply using your browser's search function for this very page and type in the string `fiancee` and see all variants, accent-marked or not, highlighted as results.

    #!/usr/bin/env perl
    use utf8;
    use Unicode::Collate;

    my $uc = Unicode::Collate->new(
        normalization => undef, level => 1
    );
    printf "pos %d len %d\n",
        $uc->index('Lettre à ma fiancée.docx', $_)
        for 'fiancée', 'fiancee', 'lettre   a ma-Fiancee _DOCX_';
    __END__
    pos 12 len 7
    pos 12 len 7
    pos 0 len 24
Pardon me if I butchered the French grammar, I do not speak the language and can't easily verify whether I made a mistake in adapting the code from a year ago. <https://news.ycombinator.com/item?id=30405840>
Re:Make JDK source code UTF-8 by jraph on Wednesday March 01, 2023 @04:36AM (#34980436)
French is my main language, "Lettre à ma fiancée" seems fine.
Re:Make JDK source code UTF-8 by forgotpwd16 on Wednesday March 01, 2023 @05:04AM (#34980616)
It isn't a falsehood but a valid remark regarding most tools. Tried searching "fiancee" in your example on VS Code and failed to find "fiancée". Of course you can consider "e=é" similar to how you can do case-insensitive search considering "e=E". Problem is most tools currently don't do this.