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 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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/