[Ttssh2-commit] [6603] 設定で CP932 への fallback を行うか設定できるようにした

svnno****@sourc***** svnno****@sourc*****
2017年 2月 22日 (水) 03:05:16 JST


Revision: 6603
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6603
Author:   doda
Date:     2017-02-22 03:05:16 +0900 (Wed, 22 Feb 2017)
Log Message:
-----------
設定で CP932 への fallback を行うか設定できるようにした

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/vtterm.c
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2017-02-21 18:05:13 UTC (rev 6602)
+++ trunk/teraterm/common/tttypes.h	2017-02-21 18:05:16 UTC (rev 6603)
@@ -506,7 +506,7 @@
 	char LogDefaultPath[MAX_PATH];
 	WORD LogAutoStart;
 	unsigned int PasteFlag;
-	WORD Dummy1;		// \x8B\x8CConfirmPasteMouseRButton. PasteFlag\x82ɓ\x9D\x8D\x87\x82\xB5\x82\xBD\x82\xBD\x82ߔp\x8E~\x81B\x91\xBC\x82֓]\x97p
+	WORD FallbackToCP932;	// ConfirmPasteMouseRButton \x82\xAA\x94p\x8E~\x82ɂȂ\xC1\x82\xBD\x82̂œ]\x97p
 	WORD DisableAcceleratorSendBreak;
 	int EnableClickableUrl;
 	eterm_lookfeel_t EtermLookfeel;

Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2017-02-21 18:05:13 UTC (rev 6602)
+++ trunk/teraterm/teraterm/vtterm.c	2017-02-21 18:05:16 UTC (rev 6603)
@@ -4929,7 +4929,8 @@
 
 	ConvJIS = FALSE;
 
-	if (ts.KanjiCode==IdSJIS || ts.KanjiCode==IdUTF8 || ts.KanjiCode==IdUTF8m) {
+	if (ts.KanjiCode==IdSJIS ||
+	   (ts.FallbackToCP932 && (ts.KanjiCode==IdUTF8 || ts.KanjiCode==IdUTF8m))) {
 		if ((0x80<b) && (b<0xa0) || (0xdf<b) && (b<0xfd)) {
 			Fallbacked = TRUE;
 			return TRUE; // SJIS kanji
@@ -5325,7 +5326,7 @@
 
 	locptr = setlocale(LC_ALL, ts.Locale);
 
-	if (Fallbacked) {
+	if (ts.FallbackToCP932 && Fallbacked) {
 		ParseFirstJP(b);
 		return;
 	}

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2017-02-21 18:05:13 UTC (rev 6602)
+++ trunk/teraterm/ttpset/ttset.c	2017-02-21 18:05:16 UTC (rev 6603)
@@ -1927,6 +1927,10 @@
 	if (GetOnOff(Section, "NormalizeLineBreakOnPaste", FName, FALSE))
 		ts->PasteFlag |= CPF_NORMALIZE_LINEBREAK;
 
+
+	// Fallback to CP932 (Experimental)
+	ts->FallbackToCP932 = GetOnOff(Section, "FallbackToCP932", FName, FALSE);
+
 	// CygTerm Configuration File
 	ReadCygtermConfFile(ts);
 }



Ttssh2-commit メーリングリストの案内