[Ttssh2-commit] [7085] DECCARA で漢字が壊れる問題を修正 #38170

Back to archive index

scmno****@osdn***** scmno****@osdn*****
2018年 3月 29日 (木) 23:58:25 JST


Revision: 7085
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7085
Author:   doda
Date:     2018-03-29 23:58:25 +0900 (Thu, 29 Mar 2018)
Log Message:
-----------
DECCARA で漢字が壊れる問題を修正 #38170

DECCARA の対象範囲の先頭が漢字の 2 バイト目だった時に 1 バイト目も
対象領域に含めるよう対象領域を広げているが、その広げた領域の属性
変更で AttrBuff2 を対象にすべき処理を AttrBuff に対して行っていた。

Ticket Links:
------------
    http://sourceforge.jp/projects/ttssh2/tracker/detail/38170

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/teraterm/teraterm/buffer.c

Added Paths:
-----------
    trunk/tests/#38170-deccara-kanji-broken.sh

-------------- next part --------------
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2018-03-29 14:58:20 UTC (rev 7084)
+++ trunk/doc/en/html/about/history.html	2018-03-29 14:58:25 UTC (rev 7085)
@@ -37,6 +37,7 @@
     <ul>
       <li>When the mouse tracking is enabled, the menu can not be selected after clicking the screen.</li>
       <li>The target area of the DECCARA (Change Attributes in Rectangular Area) and DECRARA (Reverse Attributes in Rectangular Area) control sequence is invalid.</li>
+      <li>The DECCARA control sequence breaks kanji character.</li>
     </ul>
   </li>
 </ul>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2018-03-29 14:58:20 UTC (rev 7084)
+++ trunk/doc/ja/html/about/history.html	2018-03-29 14:58:25 UTC (rev 7085)
@@ -37,6 +37,7 @@
     <ul>
       <li>\x83}\x83E\x83X\x83g\x83\x89\x83b\x83L\x83\x93\x83O\x97L\x8C\xF8\x8E\x9E\x81A\x89\xE6\x96ʃN\x83\x8A\x83b\x83N\x8C\xE3\x82Ƀ\x81\x83j\x83\x85\x81[\x82\xAA\x8Eg\x82\xA6\x82Ȃ\xAD\x82Ȃ\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
       <li>DECCARA(\x8B\xE9\x8C`\x97̈摮\x90\xAB\x95ύX)\x81A\x82\xA8\x82\xE6\x82\xD1 DECRARA(\x8B\xE9\x8C`\x97̈摮\x90\xAB\x94\xBD\x93])\x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82̑Ώۗ̈悪\x90\xB3\x82\xB5\x82\xAD\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
+      <li>DECCARA \x90\xA7\x8C\xE4\x83V\x81[\x83P\x83\x93\x83X\x82Ŋ\xBF\x8E\x9A\x82\xAA\x89\xF3\x82\xEA\x82\xE9\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li>
     </ul>
   </li>
 </ul>

Modified: trunk/teraterm/teraterm/buffer.c
===================================================================
--- trunk/teraterm/teraterm/buffer.c	2018-03-29 14:58:20 UTC (rev 7084)
+++ trunk/teraterm/teraterm/buffer.c	2018-03-29 14:58:25 UTC (rev 7085)
@@ -1204,7 +1204,7 @@
 			j = Ptr+XStart-1;
 			if (XStart>0 && (AttrBuff[j] & AttrKanji)) {
 				AttrBuff[j] = AttrBuff[j] & ~mask->Attr | attr->Attr;
-				AttrBuff[j] = AttrBuff2[j] & ~mask->Attr2 | attr->Attr2;
+				AttrBuff2[j] = AttrBuff2[j] & ~mask->Attr2 | attr->Attr2;
 				AttrBuffFG[j] = attr->Fore;
 				AttrBuffBG[j] = attr->Back;
 			}

Added: trunk/tests/#38170-deccara-kanji-broken.sh
===================================================================
--- trunk/tests/#38170-deccara-kanji-broken.sh	                        (rev 0)
+++ trunk/tests/#38170-deccara-kanji-broken.sh	2018-03-29 14:58:25 UTC (rev 7085)
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+printf "\033[2J"
+
+for i in $(seq 9); do
+	printf "\033[${i};${i}Hあいうえおかきくけこ"
+done
+
+printf '\033[2*x\033[1;7;9;22;7$r\033[0*x\033[7t\n'


Property changes on: trunk/tests/#38170-deccara-kanji-broken.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property



Ttssh2-commit メーリングリストの案内
Back to archive index