bug-bash
[Top][All Lists]
Advanced

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

Re: Unicode range and enumeration support.


From: L A Walsh
Subject: Re: Unicode range and enumeration support.
Date: Mon, 23 Dec 2019 12:57:47 -0800
User-agent: Thunderbird

On 2019/12/23 05:20, Greg Wooledge wrote:
On Fri, Dec 20, 2019 at 04:35:05PM -0800, L A Walsh wrote:=
You can't simply translate $start and $end to single Unicode code point
values, enumerate the Unicode characters between those two points,
and translate those characters back to the user's locale.  That doesn't
give you the correct answer.  There will be extra characters in the
Unicode code point range that don't fit the solution,
You would have to limit your enumeration to the locale range a well --
i.e. seeing if a character match the locale you wanted.

But NOTE -- I never suggested doing locale matching.

I just suggested Unicode code-point enumeration in Unicode CP order as
a first delivered feature.  I thought that would be much easier.


The only way to do it is to iterate over the ENTIRE code point space,
however many millions or billions of characters that is today.
It took less than a tenth of a second in perl, so probably a fraction
of that in 'C'.

Is that what you are proposing bash should do, in order to get a working
brace expansion outside of the C locale?  I don't believe this is an
acceptable solution.
I said I'd proably go with enumeration between two code points as a
first step, but even going through the entire unicode code space
is trivially fast on modern computers.






reply via email to

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