bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Chet Ramey
Subject: Re: Fwd: Non-upstream patches for bash (2014)
Date: Mon, 26 Jun 2017 14:34:32 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.2.0

On 6/26/17 12:46 PM, tetsujin@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 quoting syntax, but $'..' strings unconditionally treat 0x5C as
> a backslash...  Is there any reason a disparity like that would be desirable?

Because that's how C works, and that's how all the shells that currently
implement it work (and have always worked).

Posix has considered this feature on and off (2010, 2015, 2016)[1], albeit
with a lot of tangents.  If it ever gets standardized, I expect this
question to be resolved. When it does, and if it's required, I'll change
Posix mode to match and then we'll see.

[1] http://austingroupbugs.net/view.php?id=249

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]