[accidentally replied privately, re-sending to list]

On 22/04/2022 10:54, Geoff Clare via austin-group-l at The Open Group wrote:
Harald van Dijk wrote, on 15 Apr 2022:

For the most part(*), those shells that support locales appear to already be
in agreement that single bytes that do not form a valid multi-byte character
are interpreted as single characters that can be matched with *, with ?, and
with those single bytes themselves. Shells are not in agreement on whether
such single bytes can be matched with [...], nor in those shells where they
can be, whether multiple bracket expressions can be used to match the
individual bytes of a valid multi-byte character.

Shells are not the only issue here.  Pattern matching or expansion is also
performed by find, pax, fnmatch() and glob(), and there is no agreement
between those.  E.g. GNU find -name does not match such bytes with * or ?,
whereas Solaris find does, and the glibc fnmatch() returns an error (not
just "no match") if the string to be matched does not consist of valid
characters.

Good point that those need to be checked too. However, what you describe is only what older versions of GNU fnmatch() did. It was regarded as a bug, and fixed.

Cheers,
Harald van Dijk

            • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Christoph Anton Mitterer via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Christoph Anton Mitterer via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Christoph Anton Mitterer via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Chet Ramey via austin-group-l at The Open Group
              • ... Harald van Dijk via austin-group-l at The Open Group
          • ... Geoff Clare via austin-group-l at The Open Group
            • ... Harald van Dijk via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
      • Re:... Christoph Anton Mitterer via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
    • Re: [Is... Christoph Anton Mitterer via austin-group-l at The Open Group
  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to