Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15770
| From | L A Walsh <bash@tlinx.org> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Unicode range and enumeration support. |
| Date | 2019-12-23 12:57 -0800 |
| Message-ID | <mailman.1336.1577134680.1979.bug-bash@gnu.org> (permalink) |
| References | (7 earlier) <5DFA7AE2.2060504@tlinx.org> <20191218194651.GH851@eeg.ccf.org> <5DFD68B9.3050202@tlinx.org> <20191223132049.GW851@eeg.ccf.org> <5E012A4B.1090304@tlinx.org> |
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.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Unicode range and enumeration support. L A Walsh <bash@tlinx.org> - 2019-12-23 12:57 -0800
csiph-web