summaryrefslogtreecommitdiffstats
path: root/debian/patches/52fix_screen_utf8_nfd.patch
blob: 00a070de582344ec57b5067f8a115ef15e12b740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Author: Michael Schröder <mls@suse.de>
Reviewed-By: Axel Beckert <abe@debian.org>
Description: screen outputs screen "ÿ" after a connected character.
 This is a character without the need. 
 This happens in UTF-8 environment. 
 Before : screen$ ruby1.9.1 -e 'puts "\u304b\u3099.."'
          がÿ...
 patch applied :  screen $ ruby1.9.1 -e 'puts "\u304b\u3099.."'
          が..
Origin: https://lists.gnu.org/archive/html/screen-devel/2021-02/msg00012.html
Bugs-Debian: https://bugs.debian.org/600246
Bugs-Debian: https://bugs.debian.org/677512

diff --git a/ansi.c b/ansi.c
index 2a52edd..83b266d 100644
--- a/ansi.c
+++ b/ansi.c
@@ -692,10 +692,6 @@ register int len;
 		    }
 		  curr->w_rend.font = 0;
 		}
-#  ifdef DW_CHARS
-	      if (curr->w_encoding == UTF8 && utf8_isdouble(c))
-		curr->w_mbcs = 0xff;
-#  endif
 	      if (curr->w_encoding == UTF8 && c >= 0x0300 && utf8_iscomb(c))
 		{
 		  int ox, oy;
@@ -730,6 +726,10 @@ register int len;
 		    }
 		  break;
 		}
+#  ifdef DW_CHARS
+	      if (curr->w_encoding == UTF8 && utf8_isdouble(c))
+		curr->w_mbcs = 0xff;
+#  endif
 	      font = curr->w_rend.font;
 # endif
 # ifdef DW_CHARS