[PATCH] localedata: add new locales scn_IT and scn_US

Mike FABIAN mfabian@redhat.com
Thu May 16 15:03:58 GMT 2024


Andreas Schwab <schwab@suse.de> さんはかきました:

> On Mai 16 2024, Andreas Schwab wrote:
>
>> On Mai 16 2024, Mike FABIAN wrote:
>>
>>> David Paleino <dapal@debian.org> さんはかきました:
>>>
>>>> +LC_CTYPE
>>>> +copy "it_IT"
>>>> +
>>>> +translit_start
>>>> +ḌḌ "DDH"
>>>> +ḍḍ "ddh"
>>>> +Ḍḍ "Ddh"
>>>> +translit_end
>>>> +END LC_CTYPE
>>>
>>> I am sorry for not testing that earlier, but that translit part does not
>>> seem to work:
>>>
>>> bash-5.2# export LC_ALL=scn_IT.UTF-8 
>>> bash-5.2# echo 'ḌḌ' | iconv -f UTF-8 -t ASCII//translit 
>>> ??
>>
>> There is already a transliteration for Ḍ which takes precedence.
>
> Actually, the entries above replace the ones from translit_combining,
> but they are interpreted as "Ḍ" -> "DDH" and "ḍ" -> "ḍddh" (the third
> entry is ignored).  The proper syntax would be
>
> translit_start
> "ḌḌ" "DDH"
> "ḍḍ" "ddh"
> "Ḍḍ" "Ddh"
> translit_end

Thank you! I have tried with that syntax now but could not make it work.

> but depending on the how the binary search goes on, either these or the
> shorter matches will win.

Does it depend on the exact input how the binary search goes on?
I tried several inputs and for me the shorter matches did always win.

Then I uncommented the shorter matches in translit_combining like this:

diff --git a/localedata/locales/translit_combining b/localedata/locales/translit_combining
index ce2f19eee1..6f879d9caf 100644
--- a/localedata/locales/translit_combining
+++ b/localedata/locales/translit_combining
@@ -2486,9 +2486,9 @@ translit_start
 % LATIN SMALL LETTER D WITH DOT ABOVE
 <U1E0B> <U0064>
 % LATIN CAPITAL LETTER D WITH DOT BELOW
-<U1E0C> <U0044>
+%<U1E0C> <U0044>
 % LATIN SMALL LETTER D WITH DOT BELOW
-<U1E0D> <U0064>
+%<U1E0D> <U0064>
 % LATIN CAPITAL LETTER D WITH LINE BELOW
 <U1E0E> <U0044>
 % LATIN SMALL LETTER D WITH LINE BELOW

and after doing that,

bash-5.2# echo 'ḌḌ'|iconv -f UTF-8 -t ASCII//translit
^C
bash-5.2#

uses 100% CPU and never stops until I stop it with Control-C.

-- 
Mike FABIAN <mfabian@redhat.com>
睡眠不足はいい仕事の敵だ。



More information about the Libc-alpha mailing list