1 ## 52fix_screen_utf8_nfd.dpatch by Nobuhiro Iwamatsu <iwamatsu@debian.org>
3 ## DP: screen outputs screen "ÿ" after a connected character.
4 ## DP: This is a character without the need.
5 ## DP: This happens in UTF-8 environment.
6 ## DP: Before : screen$ ruby1.9.1 -e 'puts "\u304b\u3099.."'
8 ## DP: patch applied : screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."'
10 ## DP: Report from http://d.hatena.ne.jp/mrkn/20101014/fix_screen_utf8_nfd_bug
11 ## DP: Copyright Kenta Murata (mrkn) <mrkn@ruby-lang.org>
12 ## DP: Modified by Nobuhiro Iwamatsu <iwamatsu@debian.org>
15 ===================================================================
16 --- screen.orig/ansi.c 2012-03-20 22:15:02.000000000 +0100
17 +++ screen/ansi.c 2012-03-20 22:41:45.000000000 +0100
19 LPutChar(&curr->w_layer, &omc, ox, oy);
20 LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
24 + curr->w_rend.mbcs = curr->w_mbcs = 0;
28 font = curr->w_rend.font;
29 Index: screen/display.c
30 ===================================================================
31 --- screen.orig/display.c 2012-03-20 22:41:28.000000000 +0100
32 +++ screen/display.c 2012-03-20 22:41:45.000000000 +0100
37 - else if (utf8_isdouble(c))
38 + else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000))