Opened at 2010-07-22T01:36:05Z
Last modified at 2011-01-22T04:50:49Z
#1135 closed defect
reduce unnecessary escaping in quote_output — at Initial Version
Reported by: | davidsarah | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.8β |
Component: | code-frontend-cli | Version: | 1.7.1 |
Keywords: | usability unicode reviewed | Cc: | |
Launchpad Bug: |
Description
The quote_output function, which is used to output possibly-Unicode strings to stdout and stderr, does more backslash-escaping than is necessary for the output to be interpreted unambiguously. In particular, it will double any backslashes in the string, which makes Windows paths look ugly.
We can reduce this by making it follow POSIX-like escaping rules: within single quotes, backslashes are not special, and the only printable character that cannot appear is a single quote. If we do have a single quote or control characters in the string, then we use double quotes with backslash-escaping.