From 9fe750fb743f36ce7a8d9fd4758b98b8c6f66564 Mon Sep 17 00:00:00 2001 From: Axel Beckert Date: Mon, 20 Feb 2012 04:24:58 +0100 Subject: Add patch 52fix_screen_utf8_nfd by Nobuhiro Iwamatsu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes screen outputing "ÿ" after a connected character. (Closes: #600246) --- debian/patches/52fix_screen_utf8_nfd.patch | 41 ++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 42 insertions(+) create mode 100644 debian/patches/52fix_screen_utf8_nfd.patch (limited to 'debian/patches') diff --git a/debian/patches/52fix_screen_utf8_nfd.patch b/debian/patches/52fix_screen_utf8_nfd.patch new file mode 100644 index 0000000..c570789 --- /dev/null +++ b/debian/patches/52fix_screen_utf8_nfd.patch @@ -0,0 +1,41 @@ +## 52fix_screen_utf8_nfd.dpatch by Nobuhiro Iwamatsu +## +## DP: screen outputs screen "ÿ" after a connected character. +## DP: This is a character without the need. +## DP: This happens in UTF-8 environment. +## DP: Before : screen$ ruby1.9.1 -e 'puts "\u304b\u3099.."' +## DP: がÿ... +## DP: patch applied : screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."' +## DP: が.. +## DP: Report from http://d.hatena.ne.jp/mrkn/20101014/fix_screen_utf8_nfd_bug +## DP: Copyright Kenta Murata (mrkn) +## DP: Modified by Nobuhiro Iwamatsu + +Index: screen/ansi.c +=================================================================== +--- screen.orig/ansi.c 2011-10-06 01:30:53.000000000 +0200 ++++ screen/ansi.c 2012-02-20 03:51:02.000000000 +0100 +@@ -725,6 +725,10 @@ + LPutChar(&curr->w_layer, &omc, ox, oy); + LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); + } ++ if (curr->w_mbcs) ++ { ++ curr->w_rend.mbcs = curr->w_mbcs = 0; ++ } + break; + } + font = curr->w_rend.font; +Index: screen/display.c +=================================================================== +--- screen.orig/display.c 2012-02-20 03:50:26.000000000 +0100 ++++ screen/display.c 2012-02-20 03:51:02.000000000 +0100 +@@ -604,7 +604,7 @@ + D_x += D_AM ? 1 : -1; + D_mbcs = 0; + } +- else if (utf8_isdouble(c)) ++ else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000)) + { + D_mbcs = c; + D_x++; diff --git a/debian/patches/series b/debian/patches/series index 83d6414..ab09f30 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -20,6 +20,7 @@ 49long-usernames.patch 50increase-max-TERM-length.patch 51fix-utf8-status-padding-bug.patch +52fix_screen_utf8_nfd.patch 58-show-encoding-hardstatus.patch # 80-99: experimental patches, new features etc. 80EXP_session_creation_time.patch -- cgit v1.2.3