Revision: 8134 https://osdn.net/projects/ttssh2/scm/svn/commits/8134 Author: zmatsuo Date: 2019-09-13 01:00:11 +0900 (Fri, 13 Sep 2019) Log Message: ----------- 絵文字の描画を半角/全角で行えるようにした - CJK環境では絵文字は全角 - 非CJKでは0x1f000未満の絵文字は半角、それ以外は全角 Modified Paths: -------------- branches/unicode_buf/teraterm/teraterm/buffer.c branches/unicode_buf/teraterm/teraterm/unicode/get_f_w_a.pl branches/unicode_buf/teraterm/teraterm/unicode.cpp branches/unicode_buf/teraterm/teraterm/unicode_asian_width.tbl branches/unicode_buf/teraterm/teraterm/vtterm.c -------------- next part -------------- Modified: branches/unicode_buf/teraterm/teraterm/buffer.c =================================================================== --- branches/unicode_buf/teraterm/teraterm/buffer.c 2019-09-12 15:59:59 UTC (rev 8133) +++ branches/unicode_buf/teraterm/teraterm/buffer.c 2019-09-12 16:00:11 UTC (rev 8134) @@ -62,6 +62,7 @@ char WidthProperty; // 'W' or 'F' or 'H' or 'A' (\x95\xB6\x8E\x9A\x82̑\xAE\x90\xAB) char HalfWidth; // TRUE/FALSE = \x94\xBC\x8Ap/\x91S\x8Ap (\x95\\x8E\xA6\x82\xB7\x82\xE9\x82Ƃ\xAB\x82̕\xB6\x8E\x9A\x95\x9D) char Padding; // TRUE = \x91S\x8Ap\x82̎\x9F\x82̋l\x82ߕ\xA8 or \x8Ds\x96\x96\x82̋l\x82ߕ\xA8 + char Emoji; // TRUE = \x8AG\x95\xB6\x8E\x9A char CombinationCharCount16; // charactor count char CombinationCharSize16; // buffer size char CombinationCharCount32; @@ -128,7 +129,7 @@ #endif #if UNICODE_INTERNAL_BUFF -static void BuffSetChar2(buff_char_t *buff, char32_t u32, char property, char half_width) +static void BuffSetChar2(buff_char_t *buff, char32_t u32, char property, char half_width, char emoji) { size_t wstr_len; buff_char_t *p = buff; @@ -149,6 +150,7 @@ p->u32 = u32; p->u32_last = u32; p->Padding = FALSE; + p->Emoji = emoji; // wstr_len = UTF32ToUTF16(u32, &p->wc2[0], 2); @@ -168,7 +170,7 @@ static void BuffSetChar(buff_char_t *buff, char32_t u32, char property) { - BuffSetChar2(buff, u32, property, TRUE); + BuffSetChar2(buff, u32, property, TRUE, FALSE); } /** @@ -2631,19 +2633,43 @@ #if UNICODE_INTERNAL_BUFF static BOOL BuffIsHalfWidthFromPropery(TTTSet *ts_, char width_property) { - if (width_property == 'H') { + switch (width_property) { + case 'H': // Halfwidth + case 'n': // Narrow + case 'N': // Neutral + default: return TRUE; - } else if (width_property == 'A') { + case 'A': // Ambiguous \x9EB\x96\x86 if (ts.Language == IdJapanese) { // \x91S\x8Ap\x82Ƃ\xB5\x82Ĉ\xB5\x82\xA4 return FALSE; } return TRUE; + case 'W': + case 'F': + return FALSE; // \x91S\x8Ap } - else /*if (prop == 'F' || prop == 'W')*/ { - return FALSE; +} + +BOOL BuffIsHalfWidthFromCode(TTTSet *ts_, unsigned int u32, char *width_property, char *emoji) +{ + BOOL result = TRUE; + *width_property = UnicodeGetWidthProperty(u32); + *emoji = (char)UnicodeIsEmoji(u32); + if (*emoji) { + if (ts_->Language == IdJapanese) { + // \x91S\x8Ap + return FALSE; + } else { + if (u32 >= 0x1f000) { + return FALSE; + } + return TRUE; + } } + return BuffIsHalfWidthFromPropery(ts_, *width_property); } + #endif #if UNICODE_INTERNAL_BUFF @@ -2958,20 +2984,15 @@ } else { // \x90V\x82\xB5\x82\xA2\x95\xB6\x8E\x9A\x92lj\xC1 - const char width_property = UnicodeGetWidthProperty(u32); - char retval; - BOOL half_width; - const int is_emoji = UnicodeIsEmoji(u32); - if (!is_emoji && BuffIsHalfWidthFromPropery(&ts, width_property)) { + char width_property; + char emoji; + BOOL half_width = BuffIsHalfWidthFromCode(&ts, u32, &width_property, &emoji); + if (half_width) { // \x94\xBC\x8Ap\x82Ƃ\xB5\x82Ĉ\xB5\x82\xA4 - retval = 'H'; move_x = 1; - half_width = TRUE; } else { // \x91S\x8Ap\x82Ƃ\xB5\x82Ĉ\xB5\x82\xA4 - retval = 'W'; move_x = 2; - half_width = FALSE; if (CursorX + 2 > NumOfColumns) { // \x82͂ݏo\x82\xB7 return -1; @@ -2979,7 +3000,7 @@ } CodeLine[CursorX] = b1; - BuffSetChar2(&CodeLineW[CursorX], u32, retval, half_width); + BuffSetChar2(&CodeLineW[CursorX], u32, width_property, half_width, emoji); if (half_width) { AttrLine[CursorX] = Attr.Attr; } else { @@ -3214,6 +3235,7 @@ int lenW = 0; int lenA = 0; TCharAttr CurAttr; + BOOL CurAttrEmoji; BOOL CurSelected; BOOL EndFlag = FALSE; int count = 0; // \x8C\xBB\x8Dݒ\x8D\x96ڂ\xB5\x82Ă\xA2\x82镶\x8E\x9A,IStart\x82\xA9\x82\xE7 @@ -3240,7 +3262,7 @@ } else { if (b->u32 < 0x10000) { bufW[lenW] = b->wc2[0]; - bufWW[lenW] = b->WidthProperty; + bufWW[lenW] = b->HalfWidth ? 'H' : 'W'; lenW++; } else { // UTF-16\x82ŃT\x83\x8D\x83Q\x81[\x83g\x83y\x83A @@ -3265,13 +3287,17 @@ } } + if (b->Emoji) { + int a = 0; + } if (count == 0) { // \x8Dŏ\x89\x82\xCC1\x95\xB6\x8E\x9A\x96\xDA CurAttr = TempAttr; + CurAttrEmoji = b->Emoji; CurSelected = CheckSelect(istart+count,SY); } else if (b->u32 != 0 && - ((TCharAttrCmp(CurAttr, TempAttr) != 0) || - (CurSelected != CheckSelect(istart+count,SY)))) { + ((TCharAttrCmp(CurAttr, TempAttr) != 0 || CurAttrEmoji != b->Emoji) || + (CurSelected != CheckSelect(istart+count,SY)))){ // \x82\xB1\x82̕\xB6\x8E\x9A\x82ŃA\x83g\x83\x8A\x83r\x83\x85\x81[\x83g\x82\xAA\x95ω\xBB\x82\xB5\x82\xBD \x81\xA8 \x95`\x89\xE6 DrawFlag = TRUE; lenA--; @@ -5809,6 +5835,7 @@ wchar_t *str2_ptr; size_t str2_len; int i; + wchar_t *width_property; if (b->CombinationCharCount16 == 0) { // \x83R\x83\x93\x83r\x83l\x81[\x83V\x83\x87\x83\x93\x82Ȃ\xB5 @@ -5851,16 +5878,25 @@ } } + width_property = + b->WidthProperty == 'F' ? L"Fullwidth" : + b->WidthProperty == 'H' ? L"Halfwidth" : + b->WidthProperty == 'W' ? L"Wide" : + b->WidthProperty == 'n' ? L"Narrow" : + b->WidthProperty == 'A' ? L"Ambiguous" : + b->WidthProperty == 'N' ? L"Neutral" : + L"?"; + str2_len = aswprintf(&str2_ptr, L"\n" L"%s\n" L"'%s'\n" - L"WidthProperty %c\n" + L"WidthProperty %s\n" L"Half %s\n" L"Padding %s", codes_ptr, wcs, - b->WidthProperty, + width_property, (b->HalfWidth ? L"TRUE" : L"FALSE"), (b->Padding ? L"TRUE" : L"FALSE") ); @@ -5879,14 +5915,6 @@ return str_ptr; } -#if UNICODE_INTERNAL_BUFF -BOOL BuffIsHalfWidthFromCode(TTTSet *ts_, unsigned int u32) -{ - const char width_property = UnicodeGetWidthProperty(u32); - return BuffIsHalfWidthFromPropery(ts_, width_property); -} -#endif - void BuffSetCursorCharAttr(int x, int y, TCharAttr Attr) { const LONG TmpPtr = GetLinePtr(PageStart+y); Modified: branches/unicode_buf/teraterm/teraterm/unicode/get_f_w_a.pl =================================================================== --- branches/unicode_buf/teraterm/teraterm/unicode/get_f_w_a.pl 2019-09-12 15:59:59 UTC (rev 8133) +++ branches/unicode_buf/teraterm/teraterm/unicode/get_f_w_a.pl 2019-09-12 16:00:11 UTC (rev 8134) @@ -8,11 +8,17 @@ $start = hex $1; $end = hex $2; $type = $3; + if ($type eq "Na") { + $type = "n"; + } } elsif ($a =~ /^([0-9A-F]+);([A-Za-z]+)/) { $start = hex $1; $end = hex $1; $type = $2; + if ($type eq "Na") { + $type = "n"; + } } else { next; } @@ -30,7 +36,8 @@ $oend = $end; $otype = $type; } else { - if (($otype eq "W") || ($otype eq "F") || ($otype eq "A")) { + if (($otype eq "W") || ($otype eq "F") || ($otype eq "A") || + ($otype eq "N") || ($otype eq "n")) { printf("{ 0x%06x, 0x%06x, '$otype' },\n", $ostart, $oend); } $ostart = $start; Modified: branches/unicode_buf/teraterm/teraterm/unicode.cpp =================================================================== --- branches/unicode_buf/teraterm/teraterm/unicode.cpp 2019-09-12 15:59:59 UTC (rev 8133) +++ branches/unicode_buf/teraterm/teraterm/unicode.cpp 2019-09-12 16:00:11 UTC (rev 8134) @@ -37,9 +37,16 @@ * East_Asian_Width \x8EQ\x8Dl\x93\xC1\x90\xAB \x8E擾 * * @retval 'F' Fullwidth \x91S\x8Ap + * @retval 'H' Halfwidth \x94\xBC\x8Ap * @retval 'W' Wide \x8DL + * @retval 'n' Na,Narrow \x8B\xB7 * @retval 'A' Ambiguous \x9EB\x96\x86 - * @retval 'H' \x94\xBC\x8Ap\x88\xB5\x82\xA2 (H(Halfwidth \x94\xBC\x8Ap) or Na(Narrow \x8B\xB7) or N(Neutral \x92\x86\x97\xA7)) + * \x95\xB6\x96\xAC\x82ɂ\xE6\x82\xC1\x82ĕ\xB6\x8E\x9A\x95\x9D\x82\xAA\x88قȂ镶\x8E\x9A\x81B + * \x93\x8C\x83A\x83W\x83A\x82̑g\x94łƂ\xBB\x82\xEA\x88ȊO\x82̑g\x94ł̗\xBC\x95\xFB\x82ɏo\x8C\xBB\x82\xB5\x81A + * \x93\x8C\x83A\x83W\x83A\x82̏]\x97\x88\x95\xB6\x8E\x9A\x83R\x81[\x83h\x82ł͂\xA2\x82\xED\x82\xE4\x82\xE9\x91S\x8Ap\x82Ƃ\xB5\x82Ĉ\xB5\x82\xED\x82\xEA\x82邱\x82Ƃ\xAA\x82\xA0\x82\xE9\x81B + * \x83M\x83\x8A\x83V\x83A\x95\xB6\x8E\x9A\x82\xE2\x83L\x83\x8A\x83\x8B\x95\xB6\x8E\x9A\x82ȂǁB + * @retval 'N' Neutral \x92\x86\x97\xA7 + * \x93\x8C\x83A\x83W\x83A\x82̑g\x94łɂ͒ʏ\xED\x8Fo\x8C\xBB\x82\xB9\x82\xB8\x81A\x91S\x8Ap\x82ł\xE0\x94\xBC\x8Ap\x82ł\xE0\x82Ȃ\xA2\x81B\x83A\x83\x89\x83r\x83A\x95\xB6\x8E\x9A\x82ȂǁB */ char UnicodeGetWidthProperty(unsigned long u32) { @@ -48,7 +55,7 @@ unsigned long code_to; char property; } east_asian_width_map_t; - // W or F or A \x82\xAA\x83e\x81[\x83u\x83\x8B\x82ɓ\xFC\x82\xC1\x82Ă\xA2\x82\xE9 (\x83e\x81[\x83u\x83\x8B\x8AO\x82\xCD H) + // \x83e\x81[\x83u\x83\x8B\x82ɓ\xFC\x82\xC1\x82Ă\xA2\x82Ȃ\xA2\x8Fꍇ\x82\xCD H const static east_asian_width_map_t east_asian_width_map[] = { #include "unicode_asian_width.tbl" }; @@ -80,18 +87,6 @@ } } -#if 0 - if (result == 'A') { - // \x83L\x83\x8A\x83\x8B\x95\xB6\x8E\x9A\x93\xC1\x95\xCA(TODO) - // ? 0x500-0x520 - // 0x2de0-0x2dff - // 0xa640-0xa69f - if (0x400 <= u32 && u32 <= 0x4ff) { - result = 'H'; - } - } -#endif - return result; } Modified: branches/unicode_buf/teraterm/teraterm/unicode_asian_width.tbl =================================================================== --- branches/unicode_buf/teraterm/teraterm/unicode_asian_width.tbl 2019-09-12 15:59:59 UTC (rev 8133) +++ branches/unicode_buf/teraterm/teraterm/unicode_asian_width.tbl 2019-09-12 16:00:11 UTC (rev 8134) @@ -1,169 +1,339 @@ +{ 0x000000, 0x00001f, 'N' }, +{ 0x000020, 0x00007e, 'n' }, +{ 0x00007f, 0x0000a0, 'N' }, { 0x0000a1, 0x0000a1, 'A' }, +{ 0x0000a2, 0x0000a3, 'n' }, { 0x0000a4, 0x0000a4, 'A' }, +{ 0x0000a5, 0x0000a6, 'n' }, { 0x0000a7, 0x0000a8, 'A' }, +{ 0x0000a9, 0x0000a9, 'N' }, { 0x0000aa, 0x0000aa, 'A' }, +{ 0x0000ab, 0x0000ab, 'N' }, +{ 0x0000ac, 0x0000ac, 'n' }, { 0x0000ad, 0x0000ae, 'A' }, +{ 0x0000af, 0x0000af, 'n' }, { 0x0000b0, 0x0000b4, 'A' }, +{ 0x0000b5, 0x0000b5, 'N' }, { 0x0000b6, 0x0000ba, 'A' }, +{ 0x0000bb, 0x0000bb, 'N' }, { 0x0000bc, 0x0000bf, 'A' }, +{ 0x0000c0, 0x0000c5, 'N' }, { 0x0000c6, 0x0000c6, 'A' }, +{ 0x0000c7, 0x0000cf, 'N' }, { 0x0000d0, 0x0000d0, 'A' }, +{ 0x0000d1, 0x0000d6, 'N' }, { 0x0000d7, 0x0000d8, 'A' }, +{ 0x0000d9, 0x0000dd, 'N' }, { 0x0000de, 0x0000e1, 'A' }, +{ 0x0000e2, 0x0000e5, 'N' }, { 0x0000e6, 0x0000e6, 'A' }, +{ 0x0000e7, 0x0000e7, 'N' }, { 0x0000e8, 0x0000ea, 'A' }, +{ 0x0000eb, 0x0000eb, 'N' }, { 0x0000ec, 0x0000ed, 'A' }, +{ 0x0000ee, 0x0000ef, 'N' }, { 0x0000f0, 0x0000f0, 'A' }, +{ 0x0000f1, 0x0000f1, 'N' }, { 0x0000f2, 0x0000f3, 'A' }, +{ 0x0000f4, 0x0000f6, 'N' }, { 0x0000f7, 0x0000fa, 'A' }, +{ 0x0000fb, 0x0000fb, 'N' }, { 0x0000fc, 0x0000fc, 'A' }, +{ 0x0000fd, 0x0000fd, 'N' }, { 0x0000fe, 0x0000fe, 'A' }, +{ 0x0000ff, 0x000100, 'N' }, { 0x000101, 0x000101, 'A' }, +{ 0x000102, 0x000110, 'N' }, { 0x000111, 0x000111, 'A' }, +{ 0x000112, 0x000112, 'N' }, { 0x000113, 0x000113, 'A' }, +{ 0x000114, 0x00011a, 'N' }, { 0x00011b, 0x00011b, 'A' }, +{ 0x00011c, 0x000125, 'N' }, { 0x000126, 0x000127, 'A' }, +{ 0x000128, 0x00012a, 'N' }, { 0x00012b, 0x00012b, 'A' }, +{ 0x00012c, 0x000130, 'N' }, { 0x000131, 0x000133, 'A' }, +{ 0x000134, 0x000137, 'N' }, { 0x000138, 0x000138, 'A' }, +{ 0x000139, 0x00013e, 'N' }, { 0x00013f, 0x000142, 'A' }, +{ 0x000143, 0x000143, 'N' }, { 0x000144, 0x000144, 'A' }, +{ 0x000145, 0x000147, 'N' }, { 0x000148, 0x00014b, 'A' }, +{ 0x00014c, 0x00014c, 'N' }, { 0x00014d, 0x00014d, 'A' }, +{ 0x00014e, 0x000151, 'N' }, { 0x000152, 0x000153, 'A' }, +{ 0x000154, 0x000165, 'N' }, { 0x000166, 0x000167, 'A' }, +{ 0x000168, 0x00016a, 'N' }, { 0x00016b, 0x00016b, 'A' }, +{ 0x00016c, 0x0001cd, 'N' }, { 0x0001ce, 0x0001ce, 'A' }, +{ 0x0001cf, 0x0001cf, 'N' }, { 0x0001d0, 0x0001d0, 'A' }, +{ 0x0001d1, 0x0001d1, 'N' }, { 0x0001d2, 0x0001d2, 'A' }, +{ 0x0001d3, 0x0001d3, 'N' }, { 0x0001d4, 0x0001d4, 'A' }, +{ 0x0001d5, 0x0001d5, 'N' }, { 0x0001d6, 0x0001d6, 'A' }, +{ 0x0001d7, 0x0001d7, 'N' }, { 0x0001d8, 0x0001d8, 'A' }, +{ 0x0001d9, 0x0001d9, 'N' }, { 0x0001da, 0x0001da, 'A' }, +{ 0x0001db, 0x0001db, 'N' }, { 0x0001dc, 0x0001dc, 'A' }, +{ 0x0001dd, 0x000250, 'N' }, { 0x000251, 0x000251, 'A' }, +{ 0x000252, 0x000260, 'N' }, { 0x000261, 0x000261, 'A' }, +{ 0x000262, 0x0002c3, 'N' }, { 0x0002c4, 0x0002c4, 'A' }, +{ 0x0002c5, 0x0002c6, 'N' }, { 0x0002c7, 0x0002c7, 'A' }, +{ 0x0002c8, 0x0002c8, 'N' }, { 0x0002c9, 0x0002cb, 'A' }, +{ 0x0002cc, 0x0002cc, 'N' }, { 0x0002cd, 0x0002cd, 'A' }, +{ 0x0002ce, 0x0002cf, 'N' }, { 0x0002d0, 0x0002d0, 'A' }, +{ 0x0002d1, 0x0002d7, 'N' }, { 0x0002d8, 0x0002db, 'A' }, +{ 0x0002dc, 0x0002dc, 'N' }, { 0x0002dd, 0x0002dd, 'A' }, +{ 0x0002de, 0x0002de, 'N' }, { 0x0002df, 0x0002df, 'A' }, +{ 0x0002e0, 0x0002ff, 'N' }, { 0x000300, 0x00036f, 'A' }, +{ 0x000370, 0x000390, 'N' }, { 0x000391, 0x0003a9, 'A' }, +{ 0x0003aa, 0x0003b0, 'N' }, { 0x0003b1, 0x0003c1, 'A' }, +{ 0x0003c2, 0x0003c2, 'N' }, { 0x0003c3, 0x0003c9, 'A' }, +{ 0x0003ca, 0x000400, 'N' }, { 0x000401, 0x000401, 'A' }, +{ 0x000402, 0x00040f, 'N' }, { 0x000410, 0x00044f, 'A' }, +{ 0x000450, 0x000450, 'N' }, { 0x000451, 0x000451, 'A' }, +{ 0x000452, 0x0010ff, 'N' }, { 0x001100, 0x00115f, 'W' }, +{ 0x001160, 0x00200f, 'N' }, { 0x002010, 0x002010, 'A' }, +{ 0x002011, 0x002012, 'N' }, { 0x002013, 0x002016, 'A' }, +{ 0x002017, 0x002017, 'N' }, { 0x002018, 0x002019, 'A' }, +{ 0x00201a, 0x00201b, 'N' }, { 0x00201c, 0x00201d, 'A' }, +{ 0x00201e, 0x00201f, 'N' }, { 0x002020, 0x002022, 'A' }, +{ 0x002023, 0x002023, 'N' }, { 0x002024, 0x002027, 'A' }, +{ 0x002028, 0x00202f, 'N' }, { 0x002030, 0x002030, 'A' }, +{ 0x002031, 0x002031, 'N' }, { 0x002032, 0x002033, 'A' }, +{ 0x002034, 0x002034, 'N' }, { 0x002035, 0x002035, 'A' }, +{ 0x002036, 0x00203a, 'N' }, { 0x00203b, 0x00203b, 'A' }, +{ 0x00203c, 0x00203d, 'N' }, { 0x00203e, 0x00203e, 'A' }, +{ 0x00203f, 0x002071, 'N' }, { 0x002074, 0x002074, 'A' }, +{ 0x002075, 0x00207e, 'N' }, { 0x00207f, 0x00207f, 'A' }, +{ 0x002080, 0x002080, 'N' }, { 0x002081, 0x002084, 'A' }, +{ 0x002085, 0x0020a8, 'N' }, +{ 0x0020aa, 0x0020ab, 'N' }, { 0x0020ac, 0x0020ac, 'A' }, +{ 0x0020ad, 0x002102, 'N' }, { 0x002103, 0x002103, 'A' }, +{ 0x002104, 0x002104, 'N' }, { 0x002105, 0x002105, 'A' }, +{ 0x002106, 0x002108, 'N' }, { 0x002109, 0x002109, 'A' }, +{ 0x00210a, 0x002112, 'N' }, { 0x002113, 0x002113, 'A' }, +{ 0x002114, 0x002115, 'N' }, { 0x002116, 0x002116, 'A' }, +{ 0x002117, 0x002120, 'N' }, { 0x002121, 0x002122, 'A' }, +{ 0x002123, 0x002125, 'N' }, { 0x002126, 0x002126, 'A' }, +{ 0x002127, 0x00212a, 'N' }, { 0x00212b, 0x00212b, 'A' }, +{ 0x00212c, 0x002152, 'N' }, { 0x002153, 0x002154, 'A' }, +{ 0x002155, 0x00215a, 'N' }, { 0x00215b, 0x00215e, 'A' }, +{ 0x00215f, 0x00215f, 'N' }, { 0x002160, 0x00216b, 'A' }, +{ 0x00216c, 0x00216f, 'N' }, { 0x002170, 0x002179, 'A' }, +{ 0x00217a, 0x002188, 'N' }, { 0x002189, 0x002189, 'A' }, +{ 0x00218a, 0x00218b, 'N' }, { 0x002190, 0x002199, 'A' }, +{ 0x00219a, 0x0021b7, 'N' }, { 0x0021b8, 0x0021b9, 'A' }, +{ 0x0021ba, 0x0021d1, 'N' }, { 0x0021d2, 0x0021d2, 'A' }, +{ 0x0021d3, 0x0021d3, 'N' }, { 0x0021d4, 0x0021d4, 'A' }, +{ 0x0021d5, 0x0021e6, 'N' }, { 0x0021e7, 0x0021e7, 'A' }, +{ 0x0021e8, 0x0021ff, 'N' }, { 0x002200, 0x002200, 'A' }, +{ 0x002201, 0x002201, 'N' }, { 0x002202, 0x002203, 'A' }, +{ 0x002204, 0x002206, 'N' }, { 0x002207, 0x002208, 'A' }, +{ 0x002209, 0x00220a, 'N' }, { 0x00220b, 0x00220b, 'A' }, +{ 0x00220c, 0x00220e, 'N' }, { 0x00220f, 0x00220f, 'A' }, +{ 0x002210, 0x002210, 'N' }, { 0x002211, 0x002211, 'A' }, +{ 0x002212, 0x002214, 'N' }, { 0x002215, 0x002215, 'A' }, +{ 0x002216, 0x002219, 'N' }, { 0x00221a, 0x00221a, 'A' }, +{ 0x00221b, 0x00221c, 'N' }, { 0x00221d, 0x002220, 'A' }, +{ 0x002221, 0x002222, 'N' }, { 0x002223, 0x002223, 'A' }, +{ 0x002224, 0x002224, 'N' }, { 0x002225, 0x002225, 'A' }, +{ 0x002226, 0x002226, 'N' }, { 0x002227, 0x00222c, 'A' }, +{ 0x00222d, 0x00222d, 'N' }, { 0x00222e, 0x00222e, 'A' }, +{ 0x00222f, 0x002233, 'N' }, { 0x002234, 0x002237, 'A' }, +{ 0x002238, 0x00223b, 'N' }, { 0x00223c, 0x00223d, 'A' }, +{ 0x00223e, 0x002247, 'N' }, { 0x002248, 0x002248, 'A' }, +{ 0x002249, 0x00224b, 'N' }, { 0x00224c, 0x00224c, 'A' }, +{ 0x00224d, 0x002251, 'N' }, { 0x002252, 0x002252, 'A' }, +{ 0x002253, 0x00225f, 'N' }, { 0x002260, 0x002261, 'A' }, +{ 0x002262, 0x002263, 'N' }, { 0x002264, 0x002267, 'A' }, +{ 0x002268, 0x002269, 'N' }, { 0x00226a, 0x00226b, 'A' }, +{ 0x00226c, 0x00226d, 'N' }, { 0x00226e, 0x00226f, 'A' }, +{ 0x002270, 0x002281, 'N' }, { 0x002282, 0x002283, 'A' }, +{ 0x002284, 0x002285, 'N' }, { 0x002286, 0x002287, 'A' }, +{ 0x002288, 0x002294, 'N' }, { 0x002295, 0x002295, 'A' }, +{ 0x002296, 0x002298, 'N' }, { 0x002299, 0x002299, 'A' }, +{ 0x00229a, 0x0022a4, 'N' }, { 0x0022a5, 0x0022a5, 'A' }, +{ 0x0022a6, 0x0022be, 'N' }, { 0x0022bf, 0x0022bf, 'A' }, +{ 0x0022c0, 0x002311, 'N' }, { 0x002312, 0x002312, 'A' }, +{ 0x002313, 0x002319, 'N' }, { 0x00231a, 0x00231b, 'W' }, +{ 0x00231c, 0x002328, 'N' }, { 0x002329, 0x00232a, 'W' }, +{ 0x00232b, 0x0023e8, 'N' }, { 0x0023e9, 0x0023ec, 'W' }, +{ 0x0023ed, 0x0023ef, 'N' }, { 0x0023f0, 0x0023f0, 'W' }, +{ 0x0023f1, 0x0023f2, 'N' }, { 0x0023f3, 0x0023f3, 'W' }, +{ 0x0023f4, 0x00244a, 'N' }, { 0x002460, 0x0024e9, 'A' }, +{ 0x0024ea, 0x0024ea, 'N' }, { 0x0024eb, 0x00254b, 'A' }, +{ 0x00254c, 0x00254f, 'N' }, { 0x002550, 0x002573, 'A' }, +{ 0x002574, 0x00257f, 'N' }, { 0x002580, 0x00258f, 'A' }, +{ 0x002590, 0x002591, 'N' }, { 0x002592, 0x002595, 'A' }, +{ 0x002596, 0x00259f, 'N' }, { 0x0025a0, 0x0025a1, 'A' }, +{ 0x0025a2, 0x0025a2, 'N' }, { 0x0025a3, 0x0025a9, 'A' }, +{ 0x0025aa, 0x0025b1, 'N' }, { 0x0025b2, 0x0025b3, 'A' }, +{ 0x0025b4, 0x0025b5, 'N' }, { 0x0025b6, 0x0025b7, 'A' }, +{ 0x0025b8, 0x0025bb, 'N' }, { 0x0025bc, 0x0025bd, 'A' }, +{ 0x0025be, 0x0025bf, 'N' }, { 0x0025c0, 0x0025c1, 'A' }, +{ 0x0025c2, 0x0025c5, 'N' }, { 0x0025c6, 0x0025c8, 'A' }, +{ 0x0025c9, 0x0025ca, 'N' }, { 0x0025cb, 0x0025cb, 'A' }, +{ 0x0025cc, 0x0025cd, 'N' }, { 0x0025ce, 0x0025d1, 'A' }, +{ 0x0025d2, 0x0025e1, 'N' }, { 0x0025e2, 0x0025e5, 'A' }, +{ 0x0025e6, 0x0025ee, 'N' }, { 0x0025ef, 0x0025ef, 'A' }, +{ 0x0025f0, 0x0025fc, 'N' }, { 0x0025fd, 0x0025fe, 'W' }, +{ 0x0025ff, 0x002604, 'N' }, { 0x002605, 0x002606, 'A' }, +{ 0x002607, 0x002608, 'N' }, { 0x002609, 0x002609, 'A' }, +{ 0x00260a, 0x00260d, 'N' }, { 0x00260e, 0x00260f, 'A' }, +{ 0x002610, 0x002613, 'N' }, { 0x002614, 0x002615, 'W' }, +{ 0x002616, 0x00261b, 'N' }, { 0x00261c, 0x00261c, 'A' }, +{ 0x00261d, 0x00261d, 'N' }, { 0x00261e, 0x00261e, 'A' }, +{ 0x00261f, 0x00263f, 'N' }, { 0x002640, 0x002640, 'A' }, +{ 0x002641, 0x002641, 'N' }, { 0x002642, 0x002642, 'A' }, +{ 0x002643, 0x002647, 'N' }, { 0x002648, 0x002653, 'W' }, +{ 0x002654, 0x00265f, 'N' }, { 0x002660, 0x002661, 'A' }, +{ 0x002662, 0x002662, 'N' }, { 0x002663, 0x002665, 'A' }, +{ 0x002666, 0x002666, 'N' }, { 0x002667, 0x00266a, 'A' }, +{ 0x00266b, 0x00266b, 'N' }, { 0x00266c, 0x00266d, 'A' }, +{ 0x00266e, 0x00266e, 'N' }, { 0x00266f, 0x00266f, 'A' }, +{ 0x002670, 0x00267e, 'N' }, { 0x00267f, 0x00267f, 'W' }, +{ 0x002680, 0x002692, 'N' }, { 0x002693, 0x002693, 'W' }, +{ 0x002694, 0x00269d, 'N' }, { 0x00269e, 0x00269f, 'A' }, +{ 0x0026a0, 0x0026a0, 'N' }, { 0x0026a1, 0x0026a1, 'W' }, +{ 0x0026a2, 0x0026a9, 'N' }, { 0x0026aa, 0x0026ab, 'W' }, +{ 0x0026ac, 0x0026bc, 'N' }, { 0x0026bd, 0x0026be, 'W' }, { 0x0026bf, 0x0026bf, 'A' }, +{ 0x0026c0, 0x0026c3, 'N' }, { 0x0026c4, 0x0026c5, 'W' }, { 0x0026c6, 0x0026cd, 'A' }, { 0x0026ce, 0x0026ce, 'W' }, @@ -170,7 +340,9 @@ { 0x0026cf, 0x0026d3, 'A' }, { 0x0026d4, 0x0026d4, 'W' }, { 0x0026d5, 0x0026e1, 'A' }, +{ 0x0026e2, 0x0026e2, 'N' }, { 0x0026e3, 0x0026e3, 'A' }, +{ 0x0026e4, 0x0026e7, 'N' }, { 0x0026e8, 0x0026e9, 'A' }, { 0x0026ea, 0x0026ea, 'W' }, { 0x0026eb, 0x0026f1, 'A' }, @@ -182,75 +354,139 @@ { 0x0026fb, 0x0026fc, 'A' }, { 0x0026fd, 0x0026fd, 'W' }, { 0x0026fe, 0x0026ff, 'A' }, +{ 0x002700, 0x002704, 'N' }, { 0x002705, 0x002705, 'W' }, +{ 0x002706, 0x002709, 'N' }, { 0x00270a, 0x00270b, 'W' }, +{ 0x00270c, 0x002727, 'N' }, { 0x002728, 0x002728, 'W' }, +{ 0x002729, 0x00273c, 'N' }, { 0x00273d, 0x00273d, 'A' }, +{ 0x00273e, 0x00274b, 'N' }, { 0x00274c, 0x00274c, 'W' }, +{ 0x00274d, 0x00274d, 'N' }, { 0x00274e, 0x00274e, 'W' }, +{ 0x00274f, 0x002752, 'N' }, { 0x002753, 0x002755, 'W' }, +{ 0x002756, 0x002756, 'N' }, { 0x002757, 0x002757, 'W' }, +{ 0x002758, 0x002775, 'N' }, { 0x002776, 0x00277f, 'A' }, +{ 0x002780, 0x002794, 'N' }, { 0x002795, 0x002797, 'W' }, +{ 0x002798, 0x0027af, 'N' }, { 0x0027b0, 0x0027b0, 'W' }, +{ 0x0027b1, 0x0027be, 'N' }, { 0x0027bf, 0x0027bf, 'W' }, +{ 0x0027c0, 0x0027e5, 'N' }, +{ 0x0027e6, 0x0027ed, 'n' }, +{ 0x0027ee, 0x002984, 'N' }, +{ 0x002985, 0x002986, 'n' }, +{ 0x002987, 0x002b1a, 'N' }, { 0x002b1b, 0x002b1c, 'W' }, +{ 0x002b1d, 0x002b4f, 'N' }, { 0x002b50, 0x002b50, 'W' }, +{ 0x002b51, 0x002b54, 'N' }, { 0x002b55, 0x002b55, 'W' }, { 0x002b56, 0x002b59, 'A' }, +{ 0x002b5a, 0x002e4f, 'N' }, { 0x002e80, 0x002ffb, 'W' }, { 0x003000, 0x003000, 'F' }, { 0x003001, 0x00303e, 'W' }, +{ 0x00303f, 0x00303f, 'N' }, { 0x003041, 0x003247, 'W' }, { 0x003248, 0x00324f, 'A' }, { 0x003250, 0x004dbf, 'W' }, +{ 0x004dc0, 0x004dff, 'N' }, { 0x004e00, 0x00a4c6, 'W' }, +{ 0x00a4d0, 0x00a95f, 'N' }, { 0x00a960, 0x00a97c, 'W' }, +{ 0x00a980, 0x00abf9, 'N' }, { 0x00ac00, 0x00d7a3, 'W' }, +{ 0x00d7b0, 0x00dfff, 'N' }, { 0x00e000, 0x00f8ff, 'A' }, { 0x00f900, 0x00faff, 'W' }, +{ 0x00fb00, 0x00fdfd, 'N' }, { 0x00fe00, 0x00fe0f, 'A' }, { 0x00fe10, 0x00fe19, 'W' }, +{ 0x00fe20, 0x00fe2f, 'N' }, { 0x00fe30, 0x00fe6b, 'W' }, +{ 0x00fe70, 0x00feff, 'N' }, { 0x00ff01, 0x00ff60, 'F' }, { 0x00ffe0, 0x00ffe6, 'F' }, +{ 0x00fff9, 0x00fffc, 'N' }, { 0x00fffd, 0x00fffd, 'A' }, +{ 0x010000, 0x016f9f, 'N' }, { 0x016fe0, 0x01b2fb, 'W' }, +{ 0x01bc00, 0x01f003, 'N' }, { 0x01f004, 0x01f004, 'W' }, +{ 0x01f005, 0x01f0ce, 'N' }, { 0x01f0cf, 0x01f0cf, 'W' }, +{ 0x01f0d1, 0x01f0f5, 'N' }, { 0x01f100, 0x01f10a, 'A' }, +{ 0x01f10b, 0x01f10c, 'N' }, { 0x01f110, 0x01f12d, 'A' }, +{ 0x01f12e, 0x01f12f, 'N' }, { 0x01f130, 0x01f169, 'A' }, +{ 0x01f16a, 0x01f16c, 'N' }, { 0x01f170, 0x01f18d, 'A' }, { 0x01f18e, 0x01f18e, 'W' }, { 0x01f18f, 0x01f190, 'A' }, { 0x01f191, 0x01f19a, 'W' }, { 0x01f19b, 0x01f1ac, 'A' }, +{ 0x01f1e6, 0x01f1ff, 'N' }, { 0x01f200, 0x01f320, 'W' }, +{ 0x01f321, 0x01f32c, 'N' }, { 0x01f32d, 0x01f335, 'W' }, +{ 0x01f336, 0x01f336, 'N' }, { 0x01f337, 0x01f37c, 'W' }, +{ 0x01f37d, 0x01f37d, 'N' }, { 0x01f37e, 0x01f393, 'W' }, +{ 0x01f394, 0x01f39f, 'N' }, { 0x01f3a0, 0x01f3ca, 'W' }, +{ 0x01f3cb, 0x01f3ce, 'N' }, { 0x01f3cf, 0x01f3d3, 'W' }, +{ 0x01f3d4, 0x01f3df, 'N' }, { 0x01f3e0, 0x01f3f0, 'W' }, +{ 0x01f3f1, 0x01f3f3, 'N' }, { 0x01f3f4, 0x01f3f4, 'W' }, +{ 0x01f3f5, 0x01f3f7, 'N' }, { 0x01f3f8, 0x01f43e, 'W' }, +{ 0x01f43f, 0x01f43f, 'N' }, { 0x01f440, 0x01f440, 'W' }, +{ 0x01f441, 0x01f441, 'N' }, { 0x01f442, 0x01f4fc, 'W' }, +{ 0x01f4fd, 0x01f4fe, 'N' }, { 0x01f4ff, 0x01f53d, 'W' }, +{ 0x01f53e, 0x01f54a, 'N' }, { 0x01f54b, 0x01f54e, 'W' }, +{ 0x01f54f, 0x01f54f, 'N' }, { 0x01f550, 0x01f567, 'W' }, +{ 0x01f568, 0x01f579, 'N' }, { 0x01f57a, 0x01f57a, 'W' }, +{ 0x01f57b, 0x01f594, 'N' }, { 0x01f595, 0x01f596, 'W' }, +{ 0x01f597, 0x01f5a3, 'N' }, { 0x01f5a4, 0x01f5a4, 'W' }, +{ 0x01f5a5, 0x01f5fa, 'N' }, { 0x01f5fb, 0x01f64f, 'W' }, +{ 0x01f650, 0x01f67f, 'N' }, { 0x01f680, 0x01f6c5, 'W' }, +{ 0x01f6c6, 0x01f6cb, 'N' }, { 0x01f6cc, 0x01f6cc, 'W' }, +{ 0x01f6cd, 0x01f6cf, 'N' }, { 0x01f6d0, 0x01f6d2, 'W' }, +{ 0x01f6d3, 0x01f6d4, 'N' }, { 0x01f6d5, 0x01f6d5, 'W' }, +{ 0x01f6e0, 0x01f6ea, 'N' }, { 0x01f6eb, 0x01f6ec, 'W' }, +{ 0x01f6f0, 0x01f6f3, 'N' }, { 0x01f6f4, 0x01f6fa, 'W' }, +{ 0x01f700, 0x01f7d8, 'N' }, { 0x01f7e0, 0x01f7eb, 'W' }, +{ 0x01f800, 0x01f90b, 'N' }, { 0x01f90d, 0x01f9ff, 'W' }, +{ 0x01fa00, 0x01fa6d, 'N' }, { 0x01fa70, 0x03fffd, 'W' }, +{ 0x0e0001, 0x0e007f, 'N' }, { 0x0e0100, 0x10fffd, 'A' }, Modified: branches/unicode_buf/teraterm/teraterm/vtterm.c =================================================================== --- branches/unicode_buf/teraterm/teraterm/vtterm.c 2019-09-12 15:59:59 UTC (rev 8133) +++ branches/unicode_buf/teraterm/teraterm/vtterm.c 2019-09-12 16:00:11 UTC (rev 8134) @@ -5692,6 +5692,7 @@ // \x83G\x83\x89\x81[\x8E\x9E\x82̓J\x81[\x83\\x83\x8B\x88ʒu\x82\xF0\x8C\x9F\x93\xA2\x82\xB7\x82\xE9 Wrap = FALSE; BOOL is_update = FALSE; + CharAttrTmp.AttrEx = CharAttrTmp.Attr; retry: r = BuffPutUnicode(code, CharAttrTmp, InsertMode); if (r == -1) {