Geoff Clare <g...@opengroup.org> wrote: > Stephane Chazelas <stephane.chaze...@gmail.com> wrote, on 15 May 2018: > > > > OK, so to rephrase and make sure I understand correctly. In > > locales other than C, [[:digit:]] will be guaranteed to match on > > 0123456789 only but not [0-9]. 0123456789 are guaranteed to be > > in that order but [0-9] is unspecified anyway outside of the C > > locale. > > > > That's a bit counter-intuitive > > Not really, when you consider that ranges should use the collation > sequence, not character encodings. (For the C/POSIX locale that's > required - for others it's not, but it's the obvious way to implement > ranges with multibyte characters.)
I believe the real problem is the IBM i18n implementation that internally uses collating values to evaluate ranges. With characters, this can result in stramge effects but it permits to implement [[=o=]] easily. For digits, I would expect that there is no other glyph in between [0-9] but it may not be contiguous in a collating value notation. Jörg -- EMail:jo...@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'