]> git.pld-linux.org Git - packages/screen.git/blame - 52fix_screen_utf8_nfd.patch
- unify @direntry formatting (description at 41st column)
[packages/screen.git] / 52fix_screen_utf8_nfd.patch
CommitLineData
86ec8038
AM
1## 52fix_screen_utf8_nfd.dpatch by Nobuhiro Iwamatsu <iwamatsu@debian.org>
2##
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.."'
7## DP: がÿ...
8## DP: patch applied : screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."'
9## DP: が..
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>
13
14Index: screen/ansi.c
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
18@@ -725,6 +725,10 @@
19 LPutChar(&curr->w_layer, &omc, ox, oy);
20 LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
21 }
22+ if (curr->w_mbcs)
23+ {
24+ curr->w_rend.mbcs = curr->w_mbcs = 0;
25+ }
26 break;
27 }
28 font = curr->w_rend.font;
29Index: 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
33@@ -603,7 +603,7 @@
34 D_x += D_AM ? 1 : -1;
35 D_mbcs = 0;
36 }
37- else if (utf8_isdouble(c))
38+ else if (utf8_isdouble(c) || (c >= 0xd800 && c < 0xe000))
39 {
40 D_mbcs = c;
41 D_x++;
This page took 0.024827 seconds and 4 git commands to generate.