Re: Fwd: Non-upstream patches for bash (2014)

2017-06-26 Thread Chet Ramey
On 6/26/17 4:35 PM, tetsu...@scope-eye.net wrote: > > That's not a reason why this disparity is "desirable" IMO. It's not intended to be anything but an explanation of why things are the way they are: compatibility and backwards compatibility. -- ``The lyf so short, the craft so long to lerne.'

Re: Fwd: Non-upstream patches for bash (2014)

2017-06-26 Thread tetsujin
That's not a reason why this disparity is "desirable" IMO. Generally, the rule is that the shell interprets the shell script it's given according to the character set of the active locale. It may not allow any given sequence of characters in any given context, but in terms of how the parser trans

Re: Fwd: Non-upstream patches for bash (2014)

2017-06-26 Thread Chet Ramey
On 6/26/17 12:46 PM, tetsu...@scope-eye.net wrote: > > It seems a strange inconsistency, though: Double-quoted strings (and, > really, pretty much all other Bash syntax as far as I have seen) recognize > 0x81 0x5C as a two-byte character rather than treating 0x5C as a backslash > within the quotin

Re: Fwd: Non-upstream patches for bash (2014)

2017-06-26 Thread tetsujin
It seems a strange inconsistency, though: Double-quoted strings (and, really, pretty much all other Bash syntax as far as I have seen) recognize 0x81 0x5C as a two-byte character rather than treating 0x5C as a backslash within the quoting syntax, but $'..' strings unconditionally treat 0x5C as a b

Re: Incorrect unicode escapes

2017-06-26 Thread Chet Ramey
On 6/26/17 9:12 AM, Angus Duggan wrote: > Sorry, bashbug didn't work under cygwin... > > BASH_VERSION=4.4.12(3)-release > uname -a: CYGWIN_NT-6.1 xxx 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 > Cygwin > > The function u32toutf16() in lib/sh/unicode.c incorrectly implements > surrogate pairs.

Re: Fwd: Non-upstream patches for bash (2014)

2017-06-26 Thread Chet Ramey
On 6/25/17 11:08 PM, George wrote: > On Sun, 2017-06-25 at 12:23 -0400, Chet Ramey wrote: >> On 6/24/17 1:41 PM, Eduardo A. Bustamante López wrote: >> >>> dualbus@debian:~$ LANG=zh_CN.GBK printf '\u4e57' | od -tx1 -An 81 5c It >>> looks like it doesn't detect that \x81\x5c is a single character, an

Incorrect unicode escapes

2017-06-26 Thread Angus Duggan
Sorry, bashbug didn't work under cygwin... BASH_VERSION=4.4.12(3)-release uname -a: CYGWIN_NT-6.1 xxx 2.8.0(0.309/5/3) 2017-04-01 20:47 x86_64 Cygwin The function u32toutf16() in lib/sh/unicode.c incorrectly implements surrogate pairs. \uff08 (Full Width Left Paren) is encoded to the invalid