Re: locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Steffen Nurpmeso
Stephane Chazelas wrote: |2017-05-17 14:00:21 +0200, Steffen Nurpmeso: |[...] |>|BTW, U+00A0, should really not be a [:blank:] or [:space:]. |>|That's the whole point of that "non-breaking space" character. |> |> It is clearly defined as whitespace in Unicode and thus ISO, at |> least once

Re: locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Stephane Chazelas
2017-05-17 14:00:21 +0200, Steffen Nurpmeso: [...] > |BTW, U+00A0, should really not be a [:blank:] or [:space:]. > |That's the whole point of that "non-breaking space" character. > > It is clearly defined as whitespace in Unicode and thus ISO, at > least once i last worked with the Unicode tabl

Re: locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Steffen Nurpmeso
Stephane Chazelas wrote: |2017-05-17 09:37:31 +0100, Geoff Clare: |[...] |> That would appear to be a bug in the standard, as it doesn't match |> existing practice in any of the shells I tried (with a UTF-8 locale): |> |> $ printf 'echo\u00a0foo\n' | grep '[[:blank:]]' |> echo foo |> $ pr

Re: locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Stephane Chazelas
2017-05-17 10:21:13 +0100, Stephane Chazelas: [...] > bash has a similar issue. It treats [:blank:] as delimiters > only in locales with single-byte charsets. See > https://lists.gnu.org/archive/html/bug-bash/2014-10/msg00098.html > and the whole discussion there. [...] https://www.mail-archive.co

Re: locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Stephane Chazelas
2017-05-17 09:37:31 +0100, Geoff Clare: [...] > That would appear to be a bug in the standard, as it doesn't match > existing practice in any of the shells I tried (with a UTF-8 locale): > > $ printf 'echo\u00a0foo\n' | grep '[[:blank:]]' > echo foo > $ printf 'echo\u00a0foo\n' | sh

locale-dependent shell parsing (was: sh(1): is roundtripping of the positional parameter stack possible?)

2017-05-17 Thread Geoff Clare
Chet Ramey wrote, on 16 May 2017: > > On 5/16/17 6:33 AM, Robert Elz wrote: > > > If we start having shell parsing differently depending on what locale the > > user happens to be using, we may as well all give up now, and go find > > something else to do. > > Too late: > > http://pubs.opengroup