• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FFFTPのソースコードです。


Commit MetaInfo

Revision25262d6da000ac0d10f84c5aa75e33166f9fa05b (tree)
Time2011-11-05 16:47:43
Authors_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Add support for UTF-8 without BOM under ASCII mode transfer.
Change size and layout of the window.

Change Summary

Incremental Difference

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
--- a/Resource/FFFTP.rc
+++ b/Resource/FFFTP.rc
@@ -726,13 +726,14 @@ hset_code_dlg DIALOGEX 0, 0, 207, 139
726726 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
727727 FONT 9, "MS Pゴシック", 0, 0, 0x0
728728 BEGIN
729- GROUPBOX "ホストの漢字コード(&K)",-1,7,7,98,94,WS_GROUP
729+ GROUPBOX "ホストの漢字コード(&K)",-1,7,7,98,106,WS_GROUP
730730 CONTROL "無変換",HSET_NO_CNV,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,21,81,10
731731 CONTROL "Shift_JIS",HSET_SJIS_CNV,"Button",BS_AUTORADIOBUTTON,12,33,81,10
732732 CONTROL "JIS",HSET_JIS_CNV,"Button",BS_AUTORADIOBUTTON,12,45,41,10
733733 CONTROL "EUC",HSET_EUC_CNV,"Button",BS_AUTORADIOBUTTON,12,57,41,10
734734 CONTROL "UTF-8",HSET_UTF8N_CNV,"Button",BS_AUTORADIOBUTTON,12,69,41,10
735- CONTROL "半角カナを全角に変換",HSET_HANCNV,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,86,87,10
735+ CONTROL "UTF-8 BOM",HSET_UTF8BOM_CNV,"Button",BS_AUTORADIOBUTTON,12,81,81,10
736+ CONTROL "半角カナを全角に変換",HSET_HANCNV,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,98,87,10
736737 GROUPBOX "ファイル名の漢字コード(&N)",-1,110,7,90,115,WS_GROUP
737738 CONTROL "自動",HSET_FN_AUTO_CNV,"Button",BS_AUTORADIOBUTTON | WS_GROUP,114,21,65,10
738739 CONTROL "Shift_JIS",HSET_FN_SJIS_CNV,"Button",BS_AUTORADIOBUTTON,114,33,65,10
@@ -2121,6 +2122,7 @@ BEGIN
21212122 BUTTON ID_BUTTON40156
21222123 BUTTON ID_BUTTON40173
21232124 BUTTON ID_BUTTON40174
2125+ BUTTON ID_BUTTON40175
21242126 END
21252127
21262128 remote_toolbar_bmp TOOLBAR 16, 16
--- a/Resource/resource.h
+++ b/Resource/resource.h
@@ -429,6 +429,7 @@
429429 #define HSET_PRIVATE_KEY 1203
430430 #define HSET_THREAD_COUNT 1204
431431 #define HSET_THREAD_COUNT_SPN 1205
432+#define HSET_UTF8BOM_CNV 1206
432433 #define MENU_END 40001
433434 #define MENU_EXIT 40001
434435 #define MENU_CONNECT 40003
@@ -484,21 +485,21 @@
484485 #define MENU_KNJ_EUC 40044
485486 #define MENU_KNJ_JIS 40045
486487 #define MENU_KNJ_UTF8N 40046
487-#define MENU_KNJ_NONE 40047
488-#define MENU_L_KNJ_SJIS 40048
489-#define MENU_L_KNJ_EUC 40049
490-#define MENU_L_KNJ_JIS 40050
491-#define MENU_L_KNJ_UTF8N 40051
492-#define MENU_UPDIR 40052
493-#define MENU_DCLICK 40053
494-#define MENU_SELECT 40054
495-#define MENU_SELECT_ALL 40055
496-#define MENU_FIND 40056
497-#define MENU_FINDNEXT 40057
498-#define MENU_DOTFILE 40058
499-#define MENU_IMPORT_WS 40059
500-#define ID_BUTTON40060 40060
501-#define ID_BUTTON40061 40061
488+#define MENU_KNJ_UTF8BOM 40047
489+#define MENU_KNJ_NONE 40048
490+#define MENU_L_KNJ_SJIS 40049
491+#define MENU_L_KNJ_EUC 40050
492+#define MENU_L_KNJ_JIS 40051
493+#define MENU_L_KNJ_UTF8N 40052
494+#define MENU_L_KNJ_UTF8BOM 40053
495+#define MENU_UPDIR 40054
496+#define MENU_DCLICK 40055
497+#define MENU_SELECT 40056
498+#define MENU_SELECT_ALL 40057
499+#define MENU_FIND 40058
500+#define MENU_FINDNEXT 40059
501+#define MENU_DOTFILE 40060
502+#define MENU_IMPORT_WS 40061
502503 #define ID_BUTTON40062 40062
503504 #define ID_BUTTON40063 40063
504505 #define ID_BUTTON40064 40064
@@ -605,6 +606,7 @@
605606 #define MENU_CHANGEPASSWD 40172
606607 #define ID_BUTTON40173 40173
607608 #define ID_BUTTON40174 40174
609+#define ID_BUTTON40175 40175
608610 #define FSNOTIFY_TITLE 65535
609611 #define HOST_SIZEGRIP 65535
610612
@@ -613,8 +615,8 @@
613615 #ifdef APSTUDIO_INVOKED
614616 #ifndef APSTUDIO_READONLY_SYMBOLS
615617 #define _APS_NEXT_RESOURCE_VALUE 191
616-#define _APS_NEXT_COMMAND_VALUE 40175
617-#define _APS_NEXT_CONTROL_VALUE 1206
618+#define _APS_NEXT_COMMAND_VALUE 40176
619+#define _APS_NEXT_CONTROL_VALUE 1207
618620 #define _APS_NEXT_SYMED_VALUE 101
619621 #endif
620622 #endif
Binary files a/Resource/toolbar1.bmp and b/Resource/toolbar1.bmp differ
--- a/Resource_eng/FFFTP-eng.rc
+++ b/Resource_eng/FFFTP-eng.rc
@@ -733,13 +733,14 @@ hset_code_dlg DIALOGEX 0, 0, 207, 139
733733 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
734734 FONT 9, "MS Sans Serif", 0, 0, 0x0
735735 BEGIN
736- GROUPBOX "&Japanese Kanji Code",-1,7,7,98,94,WS_GROUP
736+ GROUPBOX "&Japanese Kanji Code",-1,7,7,98,106,WS_GROUP
737737 CONTROL "No conversion",HSET_NO_CNV,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,21,91,10
738738 CONTROL "Shift_JIS",HSET_SJIS_CNV,"Button",BS_AUTORADIOBUTTON,12,33,81,10
739739 CONTROL "JIS",HSET_JIS_CNV,"Button",BS_AUTORADIOBUTTON,12,45,41,10
740740 CONTROL "EUC",HSET_EUC_CNV,"Button",BS_AUTORADIOBUTTON,12,57,41,10
741741 CONTROL "UTF-8",HSET_UTF8N_CNV,"Button",BS_AUTORADIOBUTTON,12,69,41,10
742- CONTROL "Hankaku to Zenkaku",HSET_HANCNV,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,96,90,10
742+ CONTROL "UTF-8 BOM",HSET_UTF8BOM_CNV,"Button",BS_AUTORADIOBUTTON,12,81,81,10
743+ CONTROL "Hankaku to Zenkaku",HSET_HANCNV,"Button",BS_AUTOCHECKBOX | WS_GROUP | WS_TABSTOP,12,98,90,10
743744 GROUPBOX "&Filename Kanji Code",-1,107,7,97,116,WS_GROUP
744745 CONTROL "Automatic",HSET_FN_AUTO_CNV,"Button",BS_AUTORADIOBUTTON | WS_GROUP,111,21,65,10
745746 CONTROL "Shift_JIS",HSET_FN_SJIS_CNV,"Button",BS_AUTORADIOBUTTON,111,33,65,10
@@ -1371,7 +1372,8 @@ hset_crypt_dlg DIALOG 0, 0, 207, 139
13711372 STYLE DS_SETFONT | WS_CHILD | WS_DISABLED | WS_CAPTION
13721373 FONT 9, "MS Sans Serif"
13731374 BEGIN
1374- CONTROL "Allow to connect without encryption",HSET_NO_ENCRYPTION,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,148,10
1375+ CONTROL "Allow to connect without encryption",HSET_NO_ENCRYPTION,
1376+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,148,10
13751377 CONTROL "Connect with FTPS (Explicit)",HSET_FTPES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,21,148,10
13761378 CONTROL "Connect with FTPS (Implicit)",HSET_FTPIS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,35,148,10
13771379 CONTROL "Connect with SFTP",HSET_SFTP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,49,148,10
@@ -2143,6 +2145,7 @@ BEGIN
21432145 BUTTON ID_BUTTON40156
21442146 BUTTON ID_BUTTON40173
21452147 BUTTON ID_BUTTON40174
2148+ BUTTON ID_BUTTON40175
21462149 END
21472150
21482151 remote_toolbar_bmp TOOLBAR 16, 16
--- a/Resource_eng/resource.h
+++ b/Resource_eng/resource.h
@@ -429,6 +429,7 @@
429429 #define HSET_PRIVATE_KEY 1203
430430 #define HSET_THREAD_COUNT 1204
431431 #define HSET_THREAD_COUNT_SPN 1205
432+#define HSET_UTF8BOM_CNV 1206
432433 #define MENU_END 40001
433434 #define MENU_EXIT 40001
434435 #define MENU_CONNECT 40003
@@ -484,21 +485,21 @@
484485 #define MENU_KNJ_EUC 40044
485486 #define MENU_KNJ_JIS 40045
486487 #define MENU_KNJ_UTF8N 40046
487-#define MENU_KNJ_NONE 40047
488-#define MENU_L_KNJ_SJIS 40048
489-#define MENU_L_KNJ_EUC 40049
490-#define MENU_L_KNJ_JIS 40050
491-#define MENU_L_KNJ_UTF8N 40051
492-#define MENU_UPDIR 40052
493-#define MENU_DCLICK 40053
494-#define MENU_SELECT 40054
495-#define MENU_SELECT_ALL 40055
496-#define MENU_FIND 40056
497-#define MENU_FINDNEXT 40057
498-#define MENU_DOTFILE 40058
499-#define MENU_IMPORT_WS 40059
500-#define ID_BUTTON40060 40060
501-#define ID_BUTTON40061 40061
488+#define MENU_KNJ_UTF8BOM 40047
489+#define MENU_KNJ_NONE 40048
490+#define MENU_L_KNJ_SJIS 40049
491+#define MENU_L_KNJ_EUC 40050
492+#define MENU_L_KNJ_JIS 40051
493+#define MENU_L_KNJ_UTF8N 40052
494+#define MENU_L_KNJ_UTF8BOM 40053
495+#define MENU_UPDIR 40054
496+#define MENU_DCLICK 40055
497+#define MENU_SELECT 40056
498+#define MENU_SELECT_ALL 40057
499+#define MENU_FIND 40058
500+#define MENU_FINDNEXT 40059
501+#define MENU_DOTFILE 40060
502+#define MENU_IMPORT_WS 40061
502503 #define ID_BUTTON40062 40062
503504 #define ID_BUTTON40063 40063
504505 #define ID_BUTTON40064 40064
@@ -605,6 +606,7 @@
605606 #define MENU_CHANGEPASSWD 40172
606607 #define ID_BUTTON40173 40173
607608 #define ID_BUTTON40174 40174
609+#define ID_BUTTON40175 40175
608610 #define FSNOTIFY_TITLE 65535
609611 #define HOST_SIZEGRIP 65535
610612
@@ -613,8 +615,8 @@
613615 #ifdef APSTUDIO_INVOKED
614616 #ifndef APSTUDIO_READONLY_SYMBOLS
615617 #define _APS_NEXT_RESOURCE_VALUE 191
616-#define _APS_NEXT_COMMAND_VALUE 40175
617-#define _APS_NEXT_CONTROL_VALUE 1206
618+#define _APS_NEXT_COMMAND_VALUE 40176
619+#define _APS_NEXT_CONTROL_VALUE 1207
618620 #define _APS_NEXT_SYMED_VALUE 101
619621 #endif
620622 #endif
Binary files a/Resource_eng/toolbar1.bmp and b/Resource_eng/toolbar1.bmp differ
--- a/common.h
+++ b/common.h
@@ -687,9 +687,12 @@ LIST_UNIX_70
687687 #define KANJI_SMB_HEX 3 /* Samba-HEX */
688688 #define KANJI_SMB_CAP 4 /* Samba-CAP */
689689 #define KANJI_UTF8N 5 /* UTF-8 */
690+// UTF-8対応
691+#define KANJI_UTF8BOM 6 /* UTF-8 BOM */
690692
691693 #define KANJI_NOCNV -1 /* 漢字コード変換なし */
692694
695+// UTF-8対応
693696 #define KANJI_AUTO -1
694697
695698 /*===== サウンド =====*/
--- a/doc/eng/FFFTP.txt
+++ b/doc/eng/FFFTP.txt
@@ -49,6 +49,11 @@ Changes in Ver.1.98c
4949 -- Fixed bugs of handling multi-byte character filenames on hosts whose Kanji
5050 code of filenames are Shift_JIS.
5151
52+-- Added support for UTF-8 (without BOM) conversion under ASCII mode transfer.
53+ UTF-8 added in 1.98 was renamed UTF-8 BOM.
54+
55+-- Changed size and layout of the window at the first run.
56+
5257
5358 Outline
5459 -------
--- a/doc/eng/history.txt
+++ b/doc/eng/history.txt
@@ -21,6 +21,11 @@ Changes in Ver.1.98c
2121 -- Fixed bugs of handling multi-byte character filenames on hosts whose Kanji
2222 code of filenames are Shift_JIS.
2323
24+-- Added support for UTF-8 (without BOM) conversion under ASCII mode transfer.
25+ UTF-8 added in 1.98 was renamed UTF-8 BOM.
26+
27+-- Changed size and layout of the window at the first run.
28+
2429 Changes in Ver.1.98b
2530 --------------------
2631
--- a/doc/jpn/FFFTP.txt
+++ b/doc/jpn/FFFTP.txt
@@ -52,6 +52,13 @@ Ver 1.98c
5252 ・ホストのファイル名の漢字コードがShift_JISの場合に一部日本語を含む
5353  ファイル名を扱えないバグを修正しました。
5454
55+・アスキーモード転送の際に行われる漢字コード変換で新たにUTF-8
56+ (BOMなし)への変換をサポートしました。1.98で追加されたUTF-8を
57+ UTF-8 BOMという名称に変更しました。
58+
59+・初回起動時のウィンドウのサイズとレイアウトを変更しました(以前の
60+ バージョンの設定が残っている場合はその設定が適用されます)。
61+
5562
5663 Ver 1.96d以前へ戻す場合
5764 -----------------------
--- a/doc/jpn/history.txt
+++ b/doc/jpn/history.txt
@@ -24,6 +24,13 @@ FFFTP
2424 ・ホストのファイル名の漢字コードがShift_JISの場合に一部日本語を含む
2525  ファイル名を扱えないバグを修正しました。
2626
27+・アスキーモード転送の際に行われる漢字コード変換で新たにUTF-8
28+ (BOMなし)への変換をサポートしました。1.98で追加されたUTF-8を
29+ UTF-8 BOMという名称に変更しました。
30+
31+・初回起動時のウィンドウのサイズとレイアウトを変更しました(以前の
32+ バージョンの設定が残っている場合はその設定が適用されます)。
33+
2734 ■Ver 1.98b
2835
2936 ・信頼できないDLLの読み込みを防ぐ機能を追加しました。Microsoftの署名が
--- a/getput.c
+++ b/getput.c
@@ -1635,6 +1635,11 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
16351635 cInfo2.OutLen = cInfo.OutLen;
16361636 break;
16371637 case KANJI_UTF8N:
1638+ Continue = ConvSJIStoUTF8N(&cInfo);
1639+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
1640+ cInfo2.OutLen = cInfo.OutLen;
1641+ break;
1642+ case KANJI_UTF8BOM:
16381643 if(ProcessedBOM == NO)
16391644 {
16401645 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -1678,6 +1683,14 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
16781683 ConvSJIStoEUC(&cInfo2);
16791684 break;
16801685 case KANJI_UTF8N:
1686+ Continue = ConvJIStoSJIS(&cInfo);
1687+ cInfo2.Str = cInfo.Buf;
1688+ cInfo2.StrLen = cInfo.OutLen;
1689+ cInfo2.Buf = Buf3;
1690+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
1691+ ConvSJIStoUTF8N(&cInfo2);
1692+ break;
1693+ case KANJI_UTF8BOM:
16811694 if(ProcessedBOM == NO)
16821695 {
16831696 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -1724,6 +1737,14 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
17241737 ConvSJIStoEUC(&cInfo2);
17251738 break;
17261739 case KANJI_UTF8N:
1740+ Continue = ConvEUCtoSJIS(&cInfo);
1741+ cInfo2.Str = cInfo.Buf;
1742+ cInfo2.StrLen = cInfo.OutLen;
1743+ cInfo2.Buf = Buf3;
1744+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
1745+ ConvSJIStoUTF8N(&cInfo2);
1746+ break;
1747+ case KANJI_UTF8BOM:
17271748 if(ProcessedBOM == NO)
17281749 {
17291750 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -1742,6 +1763,50 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
17421763 }
17431764 break;
17441765 case KANJI_UTF8N:
1766+ switch(Pkt->KanjiCodeDesired)
1767+ {
1768+ case KANJI_SJIS:
1769+ Continue = ConvUTF8NtoSJIS(&cInfo);
1770+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
1771+ cInfo2.OutLen = cInfo.OutLen;
1772+ break;
1773+ case KANJI_JIS:
1774+ Continue = ConvUTF8NtoSJIS(&cInfo);
1775+ cInfo2.Str = cInfo.Buf;
1776+ cInfo2.StrLen = cInfo.OutLen;
1777+ cInfo2.Buf = Buf3;
1778+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
1779+ ConvSJIStoJIS(&cInfo2);
1780+ break;
1781+ case KANJI_EUC:
1782+ Continue = ConvUTF8NtoSJIS(&cInfo);
1783+ cInfo2.Str = cInfo.Buf;
1784+ cInfo2.StrLen = cInfo.OutLen;
1785+ cInfo2.Buf = Buf3;
1786+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
1787+ ConvSJIStoEUC(&cInfo2);
1788+ break;
1789+ case KANJI_UTF8N:
1790+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
1791+ cInfo2.OutLen = cInfo.StrLen;
1792+ Continue = NO;
1793+ break;
1794+ case KANJI_UTF8BOM:
1795+ if(ProcessedBOM == NO)
1796+ {
1797+ memcpy(Buf3, "\xEF\xBB\xBF", 3);
1798+ cInfo2.OutLen = 3;
1799+ Continue = YES;
1800+ ProcessedBOM = YES;
1801+ break;
1802+ }
1803+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
1804+ cInfo2.OutLen = cInfo.StrLen;
1805+ Continue = NO;
1806+ break;
1807+ }
1808+ break;
1809+ case KANJI_UTF8BOM:
17451810 if(ProcessedBOM == NO)
17461811 {
17471812 if(memcmp(Buf, "\xEF\xBB\xBF", 3) == 0)
@@ -1752,7 +1817,7 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
17521817 cInfo2.OutLen = 0;
17531818 switch(Pkt->KanjiCodeDesired)
17541819 {
1755- case KANJI_UTF8N:
1820+ case KANJI_UTF8BOM:
17561821 memcpy(Buf3, "\xEF\xBB\xBF", 3);
17571822 cInfo2.OutLen = 3;
17581823 break;
@@ -1789,6 +1854,11 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
17891854 cInfo2.OutLen = cInfo.StrLen;
17901855 Continue = NO;
17911856 break;
1857+ case KANJI_UTF8BOM:
1858+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
1859+ cInfo2.OutLen = cInfo.StrLen;
1860+ Continue = NO;
1861+ break;
17921862 }
17931863 break;
17941864 }
@@ -1850,6 +1920,10 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
18501920 memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
18511921 cInfo2.OutLen = cInfo.OutLen;
18521922 break;
1923+ case KANJI_UTF8BOM:
1924+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
1925+ cInfo2.OutLen = cInfo.OutLen;
1926+ break;
18531927 }
18541928 break;
18551929 case KANJI_JIS:
@@ -1881,6 +1955,13 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
18811955 cInfo2.BufSize = (BUFSIZE + 3) * 4;
18821956 ConvSJIStoUTF8N(&cInfo2);
18831957 break;
1958+ case KANJI_UTF8BOM:
1959+ cInfo2.Str = cInfo.Buf;
1960+ cInfo2.StrLen = cInfo.OutLen;
1961+ cInfo2.Buf = Buf3;
1962+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
1963+ ConvSJIStoUTF8N(&cInfo2);
1964+ break;
18841965 }
18851966 break;
18861967 case KANJI_EUC:
@@ -1912,6 +1993,13 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
19121993 cInfo2.BufSize = (BUFSIZE + 3) * 4;
19131994 ConvSJIStoUTF8N(&cInfo2);
19141995 break;
1996+ case KANJI_UTF8BOM:
1997+ cInfo2.Str = cInfo.Buf;
1998+ cInfo2.StrLen = cInfo.OutLen;
1999+ cInfo2.Buf = Buf3;
2000+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2001+ ConvSJIStoUTF8N(&cInfo2);
2002+ break;
19152003 }
19162004 break;
19172005 case KANJI_UTF8N:
@@ -1939,6 +2027,41 @@ static int DownLoadFile(TRANSPACKET *Pkt, SOCKET dSkt, int CreateMode, int *Canc
19392027 memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
19402028 cInfo2.OutLen = cInfo.OutLen;
19412029 break;
2030+ case KANJI_UTF8BOM:
2031+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2032+ cInfo2.OutLen = cInfo.OutLen;
2033+ break;
2034+ }
2035+ break;
2036+ case KANJI_UTF8BOM:
2037+ switch(Pkt->KanjiCodeDesired)
2038+ {
2039+ case KANJI_SJIS:
2040+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2041+ cInfo2.OutLen = cInfo.OutLen;
2042+ break;
2043+ case KANJI_JIS:
2044+ cInfo2.Str = cInfo.Buf;
2045+ cInfo2.StrLen = cInfo.OutLen;
2046+ cInfo2.Buf = Buf3;
2047+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2048+ ConvSJIStoJIS(&cInfo2);
2049+ break;
2050+ case KANJI_EUC:
2051+ cInfo2.Str = cInfo.Buf;
2052+ cInfo2.StrLen = cInfo.OutLen;
2053+ cInfo2.Buf = Buf3;
2054+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2055+ ConvSJIStoEUC(&cInfo2);
2056+ break;
2057+ case KANJI_UTF8N:
2058+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2059+ cInfo2.OutLen = cInfo.OutLen;
2060+ break;
2061+ case KANJI_UTF8BOM:
2062+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2063+ cInfo2.OutLen = cInfo.OutLen;
2064+ break;
19422065 }
19432066 break;
19442067 }
@@ -2647,6 +2770,11 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
26472770 cInfo2.OutLen = cInfo.OutLen;
26482771 break;
26492772 case KANJI_UTF8N:
2773+ Continue = ConvSJIStoUTF8N(&cInfo);
2774+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2775+ cInfo2.OutLen = cInfo.OutLen;
2776+ break;
2777+ case KANJI_UTF8BOM:
26502778 if(ProcessedBOM == NO)
26512779 {
26522780 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -2690,6 +2818,14 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
26902818 ConvSJIStoEUC(&cInfo2);
26912819 break;
26922820 case KANJI_UTF8N:
2821+ Continue = ConvJIStoSJIS(&cInfo);
2822+ cInfo2.Str = cInfo.Buf;
2823+ cInfo2.StrLen = cInfo.OutLen;
2824+ cInfo2.Buf = Buf3;
2825+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2826+ ConvSJIStoUTF8N(&cInfo2);
2827+ break;
2828+ case KANJI_UTF8BOM:
26932829 if(ProcessedBOM == NO)
26942830 {
26952831 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -2736,6 +2872,14 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
27362872 ConvSJIStoEUC(&cInfo2);
27372873 break;
27382874 case KANJI_UTF8N:
2875+ Continue = ConvEUCtoSJIS(&cInfo);
2876+ cInfo2.Str = cInfo.Buf;
2877+ cInfo2.StrLen = cInfo.OutLen;
2878+ cInfo2.Buf = Buf3;
2879+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2880+ ConvSJIStoUTF8N(&cInfo2);
2881+ break;
2882+ case KANJI_UTF8BOM:
27392883 if(ProcessedBOM == NO)
27402884 {
27412885 memcpy(Buf3, "\xEF\xBB\xBF", 3);
@@ -2754,6 +2898,50 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
27542898 }
27552899 break;
27562900 case KANJI_UTF8N:
2901+ switch(Pkt->KanjiCode)
2902+ {
2903+ case KANJI_SJIS:
2904+ Continue = ConvUTF8NtoSJIS(&cInfo);
2905+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
2906+ cInfo2.OutLen = cInfo.OutLen;
2907+ break;
2908+ case KANJI_JIS:
2909+ Continue = ConvUTF8NtoSJIS(&cInfo);
2910+ cInfo2.Str = cInfo.Buf;
2911+ cInfo2.StrLen = cInfo.OutLen;
2912+ cInfo2.Buf = Buf3;
2913+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2914+ ConvSJIStoJIS(&cInfo2);
2915+ break;
2916+ case KANJI_EUC:
2917+ Continue = ConvUTF8NtoSJIS(&cInfo);
2918+ cInfo2.Str = cInfo.Buf;
2919+ cInfo2.StrLen = cInfo.OutLen;
2920+ cInfo2.Buf = Buf3;
2921+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
2922+ ConvSJIStoEUC(&cInfo2);
2923+ break;
2924+ case KANJI_UTF8N:
2925+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
2926+ cInfo2.OutLen = cInfo.StrLen;
2927+ Continue = NO;
2928+ break;
2929+ case KANJI_UTF8BOM:
2930+ if(ProcessedBOM == NO)
2931+ {
2932+ memcpy(Buf3, "\xEF\xBB\xBF", 3);
2933+ cInfo2.OutLen = 3;
2934+ Continue = YES;
2935+ ProcessedBOM = YES;
2936+ break;
2937+ }
2938+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
2939+ cInfo2.OutLen = cInfo.StrLen;
2940+ Continue = NO;
2941+ break;
2942+ }
2943+ break;
2944+ case KANJI_UTF8BOM:
27572945 if(ProcessedBOM == NO)
27582946 {
27592947 if(memcmp(Buf, "\xEF\xBB\xBF", 3) == 0)
@@ -2764,7 +2952,7 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
27642952 cInfo2.OutLen = 0;
27652953 switch(Pkt->KanjiCode)
27662954 {
2767- case KANJI_UTF8N:
2955+ case KANJI_UTF8BOM:
27682956 memcpy(Buf3, "\xEF\xBB\xBF", 3);
27692957 cInfo2.OutLen = 3;
27702958 break;
@@ -2801,6 +2989,11 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
28012989 cInfo2.OutLen = cInfo.StrLen;
28022990 Continue = NO;
28032991 break;
2992+ case KANJI_UTF8BOM:
2993+ memcpy(Buf3, cInfo.Str, cInfo.StrLen);
2994+ cInfo2.OutLen = cInfo.StrLen;
2995+ Continue = NO;
2996+ break;
28042997 }
28052998 break;
28062999 }
@@ -2868,6 +3061,10 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
28683061 memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
28693062 cInfo2.OutLen = cInfo.OutLen;
28703063 break;
3064+ case KANJI_UTF8BOM:
3065+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
3066+ cInfo2.OutLen = cInfo.OutLen;
3067+ break;
28713068 }
28723069 break;
28733070 case KANJI_JIS:
@@ -2899,6 +3096,13 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
28993096 cInfo2.BufSize = (BUFSIZE + 3) * 4;
29003097 ConvSJIStoUTF8N(&cInfo2);
29013098 break;
3099+ case KANJI_UTF8BOM:
3100+ cInfo2.Str = cInfo.Buf;
3101+ cInfo2.StrLen = cInfo.OutLen;
3102+ cInfo2.Buf = Buf3;
3103+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
3104+ ConvSJIStoUTF8N(&cInfo2);
3105+ break;
29023106 }
29033107 break;
29043108 case KANJI_EUC:
@@ -2930,6 +3134,13 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
29303134 cInfo2.BufSize = (BUFSIZE + 3) * 4;
29313135 ConvSJIStoUTF8N(&cInfo2);
29323136 break;
3137+ case KANJI_UTF8BOM:
3138+ cInfo2.Str = cInfo.Buf;
3139+ cInfo2.StrLen = cInfo.OutLen;
3140+ cInfo2.Buf = Buf3;
3141+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
3142+ ConvSJIStoUTF8N(&cInfo2);
3143+ break;
29333144 }
29343145 break;
29353146 case KANJI_UTF8N:
@@ -2957,6 +3168,41 @@ static int UpLoadFile(TRANSPACKET *Pkt, SOCKET dSkt)
29573168 memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
29583169 cInfo2.OutLen = cInfo.OutLen;
29593170 break;
3171+ case KANJI_UTF8BOM:
3172+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
3173+ cInfo2.OutLen = cInfo.OutLen;
3174+ break;
3175+ }
3176+ break;
3177+ case KANJI_UTF8BOM:
3178+ switch(Pkt->KanjiCode)
3179+ {
3180+ case KANJI_SJIS:
3181+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
3182+ cInfo2.OutLen = cInfo.OutLen;
3183+ break;
3184+ case KANJI_JIS:
3185+ cInfo2.Str = cInfo.Buf;
3186+ cInfo2.StrLen = cInfo.OutLen;
3187+ cInfo2.Buf = Buf3;
3188+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
3189+ ConvSJIStoJIS(&cInfo2);
3190+ break;
3191+ case KANJI_EUC:
3192+ cInfo2.Str = cInfo.Buf;
3193+ cInfo2.StrLen = cInfo.OutLen;
3194+ cInfo2.Buf = Buf3;
3195+ cInfo2.BufSize = (BUFSIZE + 3) * 4;
3196+ ConvSJIStoEUC(&cInfo2);
3197+ break;
3198+ case KANJI_UTF8N:
3199+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
3200+ cInfo2.OutLen = cInfo.OutLen;
3201+ break;
3202+ case KANJI_UTF8BOM:
3203+ memcpy(Buf3, cInfo.Buf, cInfo.OutLen);
3204+ cInfo2.OutLen = cInfo.OutLen;
3205+ break;
29603206 }
29613207 break;
29623208 }
@@ -3382,6 +3628,8 @@ static void DispTransFileInfo(TRANSPACKET *Pkt, char *Title, int SkipButton, int
33823628 SendDlgItemMessage(Pkt->hWndTrans, TRANS_KANJI, WM_SETTEXT, 0, (LPARAM)MSGJPN123);
33833629 else if(Pkt->KanjiCode == KANJI_UTF8N)
33843630 SendDlgItemMessage(Pkt->hWndTrans, TRANS_KANJI, WM_SETTEXT, 0, (LPARAM)MSGJPN306);
3631+ else if(Pkt->KanjiCode == KANJI_UTF8BOM)
3632+ SendDlgItemMessage(Pkt->hWndTrans, TRANS_KANJI, WM_SETTEXT, 0, (LPARAM)MSGJPN329);
33853633 }
33863634 else
33873635 {
--- a/hostman.c
+++ b/hostman.c
@@ -1864,7 +1864,8 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
18641864 { HSET_SJIS_CNV, KANJI_SJIS },
18651865 { HSET_JIS_CNV, KANJI_JIS },
18661866 { HSET_EUC_CNV, KANJI_EUC },
1867- { HSET_UTF8N_CNV, KANJI_UTF8N }
1867+ { HSET_UTF8N_CNV, KANJI_UTF8N },
1868+ { HSET_UTF8BOM_CNV, KANJI_UTF8BOM }
18681869 };
18691870 #define KANJIBUTTONS (sizeof(KanjiButton)/sizeof(RADIOBUTTON))
18701871
@@ -1912,6 +1913,7 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
19121913 case WM_COMMAND :
19131914 switch(GET_WM_COMMAND_ID(wParam, lParam))
19141915 {
1916+ case HSET_SJIS_CNV :
19151917 case HSET_JIS_CNV :
19161918 case HSET_EUC_CNV :
19171919 EnableWindow(GetDlgItem(hDlg, HSET_HANCNV), TRUE);
@@ -1920,10 +1922,10 @@ static BOOL CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, LP
19201922 // UTF-8対応
19211923 case HSET_NO_CNV :
19221924 case HSET_UTF8N_CNV :
1925+ case HSET_UTF8BOM_CNV :
19231926 EnableWindow(GetDlgItem(hDlg, HSET_HANCNV), FALSE);
19241927 break;
19251928
1926- case HSET_SJIS_CNV :
19271929 case HSET_FN_JIS_CNV :
19281930 case HSET_FN_EUC_CNV :
19291931 EnableWindow(GetDlgItem(hDlg, HSET_FN_HANCNV), TRUE);
--- a/main.c
+++ b/main.c
@@ -135,12 +135,20 @@ HWND hHelpWin = NULL;
135135 /* 設定値 */
136136 int WinPosX = CW_USEDEFAULT;
137137 int WinPosY = 0;
138-int WinWidth = 630;
139-int WinHeight = 393;
140-int LocalWidth = 309;
141-int TaskHeight = 50;
142-int LocalTabWidth[4] = { 120, 90, 60, 37 };
143-int RemoteTabWidth[6] = { 120, 90, 60, 37, 60, 60 };
138+// 機能が増えたためサイズ変更
139+// VGAサイズに収まるようになっていたのをSVGAサイズに引き上げ
140+//int WinWidth = 630;
141+//int WinHeight = 393;
142+//int LocalWidth = 309;
143+//int TaskHeight = 50;
144+//int LocalTabWidth[4] = { 120, 90, 60, 37 };
145+//int RemoteTabWidth[6] = { 120, 90, 60, 37, 60, 60 };
146+int WinWidth = 790;
147+int WinHeight = 513;
148+int LocalWidth = 389;
149+int TaskHeight = 100;
150+int LocalTabWidth[4] = { 160, 110, 60, 37 };
151+int RemoteTabWidth[6] = { 160, 110, 60, 37, 60, 60 };
144152 char UserMailAdrs[USER_MAIL_LEN+1] = { "who@example.com" };
145153 char ViewerName[VIEWERS][FMAX_PATH+1] = { { "notepad" }, { "" }, { "" } };
146154 HFONT ListFont = NULL;
@@ -1148,6 +1156,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
11481156 case MENU_KNJ_EUC :
11491157 case MENU_KNJ_JIS :
11501158 case MENU_KNJ_UTF8N :
1159+ case MENU_KNJ_UTF8BOM :
11511160 case MENU_KNJ_NONE :
11521161 SetHostKanjiCode(LOWORD(wParam));
11531162 break;
@@ -1156,6 +1165,7 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
11561165 case MENU_L_KNJ_EUC :
11571166 case MENU_L_KNJ_JIS :
11581167 case MENU_L_KNJ_UTF8N :
1168+ case MENU_L_KNJ_UTF8BOM :
11591169 SetLocalKanjiCode(LOWORD(wParam));
11601170 break;
11611171
@@ -1446,6 +1456,10 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
14461456 lpttt->lpszText = MSGJPN308;
14471457 break;
14481458
1459+ case MENU_KNJ_UTF8BOM :
1460+ lpttt->lpszText = MSGJPN330;
1461+ break;
1462+
14491463 case MENU_KNJ_NONE :
14501464 lpttt->lpszText = MSGJPN173;
14511465 break;
@@ -1466,6 +1480,10 @@ static LRESULT CALLBACK FtpWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
14661480 lpttt->lpszText = MSGJPN312;
14671481 break;
14681482
1483+ case MENU_L_KNJ_UTF8BOM :
1484+ lpttt->lpszText = MSGJPN331;
1485+ break;
1486+
14691487 case MENU_KANACNV :
14701488 lpttt->lpszText = MSGJPN174;
14711489 break;
--- a/mesg-eng.h
+++ b/mesg-eng.h
@@ -326,3 +326,6 @@
326326 #define MSGJPN326 "Choose 'Yes' if you trust this certificate and continue.\r\nCN is identical: %s\r\nVerified successfully: %s\r\n\r\n%s"
327327 #define MSGJPN327 "Yes"
328328 #define MSGJPN328 "No"
329+#define MSGJPN329 "UTF-8 BOM"
330+#define MSGJPN330 "UTF-8 BOM Kanji Code"
331+#define MSGJPN331 "UTF-8 BOM Kanji Code (Local)"
--- a/mesg-eng.old.h
+++ b/mesg-eng.old.h
@@ -326,3 +326,6 @@
326326 #define MSGJPN326 "Choose 'Yes' if you trust this certificate and continue.\r\nCN is identical: %s\r\nVerified successfully: %s\r\n\r\n%s"
327327 #define MSGJPN327 "Yes"
328328 #define MSGJPN328 "No"
329+#define MSGJPN329 "UTF-8 BOM"
330+#define MSGJPN330 "UTF-8 BOM Kanji Code"
331+#define MSGJPN331 "UTF-8 BOM Kanji Code (Local)"
--- a/mesg-jpn.h
+++ b/mesg-jpn.h
@@ -326,3 +326,6 @@
326326 #define MSGJPN326 "\xE3\x81\x93\xE3\x81\xAE\xE8\xA8\xBC\xE6\x98\x8E\xE6\x9B\xB8\xE3\x82\x92\xE4\xBF\xA1\xE9\xA0\xBC\xE3\x81\x97,\xE9\x80\x9A\xE4\xBF\xA1\xE3\x82\x92\xE7\xB6\x9A\xE8\xA1\x8C\xE3\x81\x99\xE3\x82\x8B\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE3\x81\xAF\xE3\x81\x84\xE3\x80\x8D\xE3\x82\x92\xE9\x81\xB8\xE6\x8A\x9E\xE3\x81\x97\xE3\x81\xA6\xE3\x81\x8F\xE3\x81\xA0\xE3\x81\x95\xE3\x81\x84.\r\nCN\xE3\x81\xAE\xE4\xB8\x80\xE8\x87\xB4: %s\r\n\xE6\xA4\x9C\xE8\xA8\xBC\xE3\x81\xAB\xE6\x88\x90\xE5\x8A\x9F: %s\r\n\r\n%s"
327327 #define MSGJPN327 "\xE3\x81\xAF\xE3\x81\x84"
328328 #define MSGJPN328 "\xE3\x81\x84\xE3\x81\x84\xE3\x81\x88"
329+#define MSGJPN329 "UTF-8 BOM"
330+#define MSGJPN330 "\xE3\x83\x9B\xE3\x82\xB9\xE3\x83\x88\xE3\x81\xAE\xE6\xBC\xA2\xE5\xAD\x97\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x89\xE3\x81\xAFUTF-8 BOM"
331+#define MSGJPN331 "\xE3\x83\xAD\xE3\x83\xBC\xE3\x82\xAB\xE3\x83\xAB\xE3\x81\xAE\xE6\xBC\xA2\xE5\xAD\x97\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x89\xE3\x81\xAFUTF-8 BOM"
--- a/mesg-jpn.old.h
+++ b/mesg-jpn.old.h
@@ -326,3 +326,6 @@
326326 #define MSGJPN326 "この証明書を信頼し,通信を続行するには「はい」を選択してください.\r\nCNの一致: %s\r\n検証に成功: %s\r\n\r\n%s"
327327 #define MSGJPN327 "はい"
328328 #define MSGJPN328 "いいえ"
329+#define MSGJPN329 "UTF-8 BOM"
330+#define MSGJPN330 "ホストの漢字コードはUTF-8 BOM"
331+#define MSGJPN331 "ローカルの漢字コードはUTF-8 BOM"
--- a/registory.c
+++ b/registory.c
@@ -877,6 +877,12 @@ int LoadRegistory(void)
877877 ReadIntValueFromReg(hKey5, "Port", &Host.Port);
878878 ReadIntValueFromReg(hKey5, "Anonymous", &Host.Anonymous);
879879 ReadIntValueFromReg(hKey5, "Kanji", &Host.KanjiCode);
880+ // 1.98b以前のUTF-8はBOMあり
881+ if(Version < 1983)
882+ {
883+ if(Host.KanjiCode == KANJI_UTF8N)
884+ Host.KanjiCode = KANJI_UTF8BOM;
885+ }
880886 ReadIntValueFromReg(hKey5, "KanaCnv", &Host.KanaCnv);
881887 ReadIntValueFromReg(hKey5, "NameKanji", &Host.NameKanjiCode);
882888 ReadIntValueFromReg(hKey5, "NameKana", &Host.NameKanaCnv);
--- a/toolmenu.c
+++ b/toolmenu.c
@@ -140,11 +140,13 @@ static TBBUTTON TbarDataMain[] = {
140140 { 20, MENU_L_KNJ_EUC, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
141141 { 21, MENU_L_KNJ_JIS, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
142142 { 28, MENU_L_KNJ_UTF8N, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
143+ { 29, MENU_L_KNJ_UTF8BOM, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
143144 { 0, 0, TBSTATE_ENABLED, BTNS_SEP, 0, 0 },
144145 { 27, MENU_KNJ_SJIS, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
145146 { 20, MENU_KNJ_EUC, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
146147 { 21, MENU_KNJ_JIS, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
147148 { 28, MENU_KNJ_UTF8N, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
149+ { 29, MENU_KNJ_UTF8BOM, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
148150 { 22, MENU_KNJ_NONE, TBSTATE_ENABLED, TBSTYLE_CHECKGROUP, 0, 0 },
149151 { 0, 0, TBSTATE_ENABLED, BTNS_SEP, 0, 0 },
150152 { 23, MENU_KANACNV, TBSTATE_ENABLED, TBSTYLE_CHECK, 0, 0 },
@@ -195,8 +197,8 @@ static const int HideMenus[] = {
195197 MENU_HELP, MENU_HELP_TROUBLE, MENU_ABOUT,
196198 MENU_REGINIT,
197199 MENU_TEXT, MENU_BINARY, MENU_AUTO,
198- MENU_KNJ_SJIS, MENU_KNJ_EUC, MENU_KNJ_JIS, MENU_KNJ_UTF8N, MENU_KNJ_NONE,
199- MENU_L_KNJ_SJIS, MENU_L_KNJ_EUC, MENU_L_KNJ_JIS, MENU_L_KNJ_UTF8N,
200+ MENU_KNJ_SJIS, MENU_KNJ_EUC, MENU_KNJ_JIS, MENU_KNJ_UTF8N, MENU_KNJ_UTF8BOM, MENU_KNJ_NONE,
201+ MENU_L_KNJ_SJIS, MENU_L_KNJ_EUC, MENU_L_KNJ_JIS, MENU_L_KNJ_UTF8N, MENU_L_KNJ_UTF8BOM,
200202 MENU_KANACNV,
201203 MENU_LOCAL_UPDIR, MENU_LOCAL_CHDIR,
202204 MENU_REMOTE_UPDIR, MENU_REMOTE_CHDIR,
@@ -1028,6 +1030,10 @@ void SetHostKanjiCode(int Type)
10281030 TmpHostKanjiCode = KANJI_UTF8N;
10291031 break;
10301032
1033+ case MENU_KNJ_UTF8BOM :
1034+ TmpHostKanjiCode = KANJI_UTF8BOM;
1035+ break;
1036+
10311037 default :
10321038 TmpHostKanjiCode = KANJI_NOCNV;
10331039 break;
@@ -1068,6 +1074,10 @@ void DispHostKanjiCode(void)
10681074 SendMessage(hWndTbarMain, TB_CHECKBUTTON, MENU_KNJ_UTF8N, MAKELONG(TRUE, 0));
10691075 break;
10701076
1077+ case KANJI_UTF8BOM :
1078+ SendMessage(hWndTbarMain, TB_CHECKBUTTON, MENU_KNJ_UTF8BOM, MAKELONG(TRUE, 0));
1079+ break;
1080+
10711081 default :
10721082 SendMessage(hWndTbarMain, TB_CHECKBUTTON, MENU_KNJ_NONE, MAKELONG(TRUE, 0));
10731083 break;
@@ -1110,6 +1120,7 @@ void HideHostKanjiButton(void)
11101120 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_EUC, MAKELONG(FALSE, 0));
11111121 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_JIS, MAKELONG(FALSE, 0));
11121122 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_UTF8N, MAKELONG(FALSE, 0));
1123+ SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_UTF8BOM, MAKELONG(FALSE, 0));
11131124 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_NONE, MAKELONG(FALSE, 0));
11141125 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KANACNV, MAKELONG(FALSE, 0));
11151126 break;
@@ -1119,6 +1130,7 @@ void HideHostKanjiButton(void)
11191130 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_EUC, MAKELONG(TRUE, 0));
11201131 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_JIS, MAKELONG(TRUE, 0));
11211132 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_UTF8N, MAKELONG(TRUE, 0));
1133+ SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_UTF8BOM, MAKELONG(TRUE, 0));
11221134 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KNJ_NONE, MAKELONG(TRUE, 0));
11231135 // if(TmpHostKanjiCode != KANJI_NOCNV)
11241136 // SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KANACNV, MAKELONG(TRUE, 0));
@@ -1179,6 +1191,10 @@ void SetLocalKanjiCode(int Type)
11791191 case MENU_L_KNJ_UTF8N :
11801192 TmpLocalKanjiCode = KANJI_UTF8N;
11811193 break;
1194+
1195+ case MENU_L_KNJ_UTF8BOM :
1196+ TmpLocalKanjiCode = KANJI_UTF8BOM;
1197+ break;
11821198 }
11831199 DispLocalKanjiCode();
11841200 HideLocalKanjiButton();
@@ -1205,6 +1221,10 @@ void DispLocalKanjiCode(void)
12051221 case KANJI_UTF8N :
12061222 SendMessage(hWndTbarMain, TB_CHECKBUTTON, MENU_L_KNJ_UTF8N, MAKELONG(TRUE, 0));
12071223 break;
1224+
1225+ case KANJI_UTF8BOM :
1226+ SendMessage(hWndTbarMain, TB_CHECKBUTTON, MENU_L_KNJ_UTF8BOM, MAKELONG(TRUE, 0));
1227+ break;
12081228 }
12091229 return;
12101230 }
@@ -1224,6 +1244,7 @@ void HideLocalKanjiButton(void)
12241244 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_EUC, MAKELONG(FALSE, 0));
12251245 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_JIS, MAKELONG(FALSE, 0));
12261246 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_UTF8N, MAKELONG(FALSE, 0));
1247+ SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_UTF8BOM, MAKELONG(FALSE, 0));
12271248 break;
12281249
12291250 default :
@@ -1231,6 +1252,7 @@ void HideLocalKanjiButton(void)
12311252 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_EUC, MAKELONG(TRUE, 0));
12321253 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_JIS, MAKELONG(TRUE, 0));
12331254 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_UTF8N, MAKELONG(TRUE, 0));
1255+ SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_L_KNJ_UTF8BOM, MAKELONG(TRUE, 0));
12341256 // 現在カナ変換はShift_JIS、JIS、EUC間でのみ機能する
12351257 SendMessage(hWndTbarMain, TB_ENABLEBUTTON, MENU_KANACNV, MAKELONG(FALSE, 0));
12361258 switch(TmpHostKanjiCode)