From 06eb271bda3a0ef832d9a1aa1d3e84b2d39e5dfa Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 22 Mar 2014 14:46:23 -0700 Subject: [PATCH] Changes full_escape to not generate \x escapes for non-ASCII characters. Partially reverts 51de269 . Fixes #1225 --- env_universal_common.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/env_universal_common.cpp b/env_universal_common.cpp index dbf79c1a6..c175b4a14 100644 --- a/env_universal_common.cpp +++ b/env_universal_common.cpp @@ -756,8 +756,9 @@ static wcstring full_escape(const wchar_t *in) { out.push_back(c); } - else if (c < 256) + else if (c <= ASCII_MAX) { + // See #1225 for discussion of use of ASCII_MAX here append_format(out, L"\\x%.2x", c); } else if (c < 65536)