From bd3b3304773651978ded19968f5801e11fc0609b Mon Sep 17 00:00:00 2001 From: tg Date: Sat, 19 Sep 2009 22:32:23 +0000 Subject: [PATCH] =?UTF-8?q?\x=20only=20auto-converts=20to=20unicode=20for?= =?UTF-8?q?=20$'=E2=80=A6'=20and=20printf=20if=20>0xFF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- misc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc.c b/misc.c index 89583c7..3dbe775 100644 --- a/misc.c +++ b/misc.c @@ -29,7 +29,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.121 2009/09/19 21:54:45 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.122 2009/09/19 22:32:23 tg Exp $"); #undef USE_CHVT /* XXX conditions correct? */ @@ -1542,7 +1542,7 @@ unbksl(bool cstyle, int (*fg)(void), void (*fp)(int)) /* * x: look for a hexadecimal number with up to * two (C style: arbitrary) digits; convert - * to raw octet (C style: Unicode) + * to raw octet (C style: Unicode if >0xFF) * u/U: look for a hexadecimal number with up to * four (U: eight) digits; convert to Unicode */ @@ -1561,7 +1561,7 @@ unbksl(bool cstyle, int (*fg)(void), void (*fp)(int)) break; } } - if (cstyle || fc != 'x') + if ((cstyle && wc > 0xFF) || fc != 'x') /* Unicode marker */ wc += 0x100; break;