Package: bash Version: 4.2-1 Tags: patch Command: echo -e '\u0041 \u00a3 \u0152' Expected output: A £ Œ Displayed output: A � Œ
hexdump shows that the difference is that in what is actually written to stdout, there is an 0xA3 but no preceding 0xC2: the code point has not been converted to UTF-8 for display, but has been output as if it needed no encoding. The fix is trivial; a patch is attached. -- | _ | Darren Salt, using Debian GNU/Linux (and Android) | ( ) | | X | ASCII Ribbon campaign against HTML e-mail | / \ | http://www.asciiribbon.org/ Ahead warp factor one, Mr. Sulu.
--- a/bash/lib/sh/strtrans.c~ 2010-11-06 23:29:14.000000000 +0000 +++ b/bash/lib/sh/strtrans.c 2012-02-26 20:22:29.107916655 +0000 @@ -144,7 +144,7 @@ *r++ = '\\'; /* c remains unchanged */ break; } - else if (v <= UCHAR_MAX) + else if (v <= SCHAR_MAX) { c = v; break;