FFFTPのソースコードです。
Revision | 3690ca6fb5c2fceccf3d50aa90df75a75daf7d48 (tree) |
---|---|
Zeit | 2013-10-20 10:58:34 |
Autor | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Fix bugs of automatic detection for Kanji code of filenames.
Add messages for automatic detection for Kanji code of filenames.
@@ -432,6 +432,24 @@ int FlushRestData(CODECONVINFO *cInfo) | ||
432 | 432 | } |
433 | 433 | |
434 | 434 | |
435 | +// UTF-8対応 | |
436 | +int ConvNoConv(CODECONVINFO *cInfo) | |
437 | +{ | |
438 | + int Continue; | |
439 | + Continue = NO; | |
440 | + if(cInfo->BufSize >= cInfo->StrLen) | |
441 | + cInfo->OutLen = cInfo->StrLen; | |
442 | + else | |
443 | + { | |
444 | + cInfo->OutLen = cInfo->BufSize; | |
445 | + Continue = YES; | |
446 | + } | |
447 | + memcpy(cInfo->Buf, cInfo->Str, sizeof(char) * cInfo->OutLen); | |
448 | + cInfo->Str += cInfo->OutLen; | |
449 | + cInfo->StrLen -= cInfo->OutLen; | |
450 | + return Continue; | |
451 | +} | |
452 | + | |
435 | 453 | /*----- EUC漢字コードをSHIFT-JIS漢字コードに変換 ------------------------------ |
436 | 454 | * |
437 | 455 | * Parameter |
@@ -1878,6 +1896,8 @@ int ConvUTF8NtoUTF8HFSX(CODECONVINFO *cInfo) | ||
1878 | 1896 | char* Temp3Cur; |
1879 | 1897 | char* Temp3End; |
1880 | 1898 | int TempCount; |
1899 | + if(IsUnicodeNormalizationDllLoaded() == NO) | |
1900 | + return ConvNoConv(cInfo); | |
1881 | 1901 | Continue = NO; |
1882 | 1902 | SrcLength = cInfo->StrLen + cInfo->EscUTF8Len; |
1883 | 1903 | if(!(pSrc = (char*)malloc(sizeof(char) * (SrcLength + 1)))) |
@@ -2027,6 +2047,8 @@ int ConvUTF8HFSXtoUTF8N(CODECONVINFO *cInfo) | ||
2027 | 2047 | wchar_t* pUTF16HFSX; |
2028 | 2048 | CODECONVINFO Temp; |
2029 | 2049 | int Count; |
2050 | + if(IsUnicodeNormalizationDllLoaded() == NO) | |
2051 | + return ConvNoConv(cInfo); | |
2030 | 2052 | Continue = NO; |
2031 | 2053 | // 前回の変換不能な残りの文字列を入力の先頭に結合 |
2032 | 2054 | SrcLength = cInfo->StrLen + cInfo->EscUTF8Len; |
@@ -1728,6 +1728,8 @@ int ConvTermCodeToCRLF(TERMCODECONVINFO *cInfo); | ||
1728 | 1728 | |
1729 | 1729 | void InitCodeConvInfo(CODECONVINFO *cInfo); |
1730 | 1730 | int FlushRestData(CODECONVINFO *cInfo); |
1731 | +// UTF-8対応 | |
1732 | +int ConvNoConv(CODECONVINFO *cInfo); | |
1731 | 1733 | int ConvEUCtoSJIS(CODECONVINFO *cInfo); |
1732 | 1734 | int ConvJIStoSJIS(CODECONVINFO *cInfo); |
1733 | 1735 | int ConvSMBtoSJIS(CODECONVINFO *cInfo); |
@@ -235,6 +235,27 @@ void ConnectProc(int Type, int Num) | ||
235 | 235 | { |
236 | 236 | if(DoDirListCmdSkt("", "", 999, &CancelFlg) == FTP_COMPLETE) |
237 | 237 | CurHost.CurNameKanjiCode = AnalyzeNameKanjiCode(999); |
238 | + switch(CurHost.CurNameKanjiCode) | |
239 | + { | |
240 | + case KANJI_SJIS: | |
241 | + SetTaskMsg(MSGJPN344, MSGJPN346); | |
242 | + break; | |
243 | + case KANJI_JIS: | |
244 | + SetTaskMsg(MSGJPN344, MSGJPN347); | |
245 | + break; | |
246 | + case KANJI_EUC: | |
247 | + SetTaskMsg(MSGJPN344, MSGJPN348); | |
248 | + break; | |
249 | + case KANJI_UTF8N: | |
250 | + SetTaskMsg(MSGJPN344, MSGJPN349); | |
251 | + break; | |
252 | + case KANJI_UTF8HFSX: | |
253 | + SetTaskMsg(MSGJPN344, MSGJPN350); | |
254 | + break; | |
255 | + default: | |
256 | + SetTaskMsg(MSGJPN345); | |
257 | + break; | |
258 | + } | |
238 | 259 | } |
239 | 260 | |
240 | 261 | strcpy(TitleHostName, CurHost.HostName); |
@@ -328,6 +349,27 @@ void QuickConnectProc(void) | ||
328 | 349 | { |
329 | 350 | if(DoDirListCmdSkt("", "", 999, &CancelFlg) == FTP_COMPLETE) |
330 | 351 | CurHost.CurNameKanjiCode = AnalyzeNameKanjiCode(999); |
352 | + switch(CurHost.CurNameKanjiCode) | |
353 | + { | |
354 | + case KANJI_SJIS: | |
355 | + SetTaskMsg(MSGJPN344, MSGJPN346); | |
356 | + break; | |
357 | + case KANJI_JIS: | |
358 | + SetTaskMsg(MSGJPN344, MSGJPN347); | |
359 | + break; | |
360 | + case KANJI_EUC: | |
361 | + SetTaskMsg(MSGJPN344, MSGJPN348); | |
362 | + break; | |
363 | + case KANJI_UTF8N: | |
364 | + SetTaskMsg(MSGJPN344, MSGJPN349); | |
365 | + break; | |
366 | + case KANJI_UTF8HFSX: | |
367 | + SetTaskMsg(MSGJPN344, MSGJPN350); | |
368 | + break; | |
369 | + default: | |
370 | + SetTaskMsg(MSGJPN345); | |
371 | + break; | |
372 | + } | |
331 | 373 | } |
332 | 374 | |
333 | 375 | strcpy(TitleHostName, CurHost.HostAdrs); |
@@ -516,6 +558,27 @@ void DirectConnectProc(char *unc, int Kanji, int Kana, int Fkanji, int TrMode) | ||
516 | 558 | { |
517 | 559 | if(DoDirListCmdSkt("", "", 999, &CancelFlg) == FTP_COMPLETE) |
518 | 560 | CurHost.CurNameKanjiCode = AnalyzeNameKanjiCode(999); |
561 | + switch(CurHost.CurNameKanjiCode) | |
562 | + { | |
563 | + case KANJI_SJIS: | |
564 | + SetTaskMsg(MSGJPN344, MSGJPN346); | |
565 | + break; | |
566 | + case KANJI_JIS: | |
567 | + SetTaskMsg(MSGJPN344, MSGJPN347); | |
568 | + break; | |
569 | + case KANJI_EUC: | |
570 | + SetTaskMsg(MSGJPN344, MSGJPN348); | |
571 | + break; | |
572 | + case KANJI_UTF8N: | |
573 | + SetTaskMsg(MSGJPN344, MSGJPN349); | |
574 | + break; | |
575 | + case KANJI_UTF8HFSX: | |
576 | + SetTaskMsg(MSGJPN344, MSGJPN350); | |
577 | + break; | |
578 | + default: | |
579 | + SetTaskMsg(MSGJPN345); | |
580 | + break; | |
581 | + } | |
519 | 582 | } |
520 | 583 | |
521 | 584 | strcpy(TitleHostName, CurHost.HostAdrs); |
@@ -606,6 +669,27 @@ void HistoryConnectProc(int MenuCmd) | ||
606 | 669 | { |
607 | 670 | if(DoDirListCmdSkt("", "", 999, &CancelFlg) == FTP_COMPLETE) |
608 | 671 | CurHost.CurNameKanjiCode = AnalyzeNameKanjiCode(999); |
672 | + switch(CurHost.CurNameKanjiCode) | |
673 | + { | |
674 | + case KANJI_SJIS: | |
675 | + SetTaskMsg(MSGJPN344, MSGJPN346); | |
676 | + break; | |
677 | + case KANJI_JIS: | |
678 | + SetTaskMsg(MSGJPN344, MSGJPN347); | |
679 | + break; | |
680 | + case KANJI_EUC: | |
681 | + SetTaskMsg(MSGJPN344, MSGJPN348); | |
682 | + break; | |
683 | + case KANJI_UTF8N: | |
684 | + SetTaskMsg(MSGJPN344, MSGJPN349); | |
685 | + break; | |
686 | + case KANJI_UTF8HFSX: | |
687 | + SetTaskMsg(MSGJPN344, MSGJPN350); | |
688 | + break; | |
689 | + default: | |
690 | + SetTaskMsg(MSGJPN345); | |
691 | + break; | |
692 | + } | |
609 | 693 | } |
610 | 694 | |
611 | 695 | strcpy(TitleHostName, CurHost.HostAdrs); |
@@ -6198,6 +6198,7 @@ int AnalyzeNameKanjiCode(int Num) | ||
6198 | 6198 | } |
6199 | 6199 | if(!p) |
6200 | 6200 | { |
6201 | + // ASCII文字の範囲外 | |
6201 | 6202 | if(!CheckStringM(Name)) |
6202 | 6203 | { |
6203 | 6204 | InitCodeConvInfo(&cInfo1); |
@@ -6209,29 +6210,33 @@ int AnalyzeNameKanjiCode(int Num) | ||
6209 | 6210 | cInfo2 = cInfo1; |
6210 | 6211 | ConvUTF8NtoUTF8HFSX(&cInfo1); |
6211 | 6212 | ConvUTF8HFSXtoUTF8N(&cInfo2); |
6212 | - if(cInfo1.OutLen > strlen(Name)) | |
6213 | + if(cInfo1.OutLen > (int)strlen(Name)) | |
6213 | 6214 | PointUTF8N++; |
6214 | 6215 | else |
6215 | 6216 | PointUTF8HFSX++; |
6216 | - if(cInfo2.OutLen < strlen(Name)) | |
6217 | + if(cInfo2.OutLen < (int)strlen(Name)) | |
6217 | 6218 | PointUTF8HFSX++; |
6218 | 6219 | else |
6219 | 6220 | PointUTF8N++; |
6220 | 6221 | } |
6221 | - else | |
6222 | + switch(CheckKanjiCode(Name, strlen(Name), KANJI_SJIS)) | |
6222 | 6223 | { |
6223 | - switch(CheckKanjiCode(Name, strlen(Name), KANJI_SJIS)) | |
6224 | - { | |
6225 | - case KANJI_SJIS: | |
6226 | - PointSJIS++; | |
6227 | - break; | |
6228 | - case KANJI_JIS: | |
6229 | - PointJIS++; | |
6230 | - break; | |
6231 | - case KANJI_EUC: | |
6232 | - PointEUC++; | |
6233 | - break; | |
6234 | - } | |
6224 | + case KANJI_SJIS: | |
6225 | + PointSJIS++; | |
6226 | + break; | |
6227 | + case KANJI_EUC: | |
6228 | + PointEUC++; | |
6229 | + break; | |
6230 | + } | |
6231 | + } | |
6232 | + else | |
6233 | + { | |
6234 | + // ASCII文字の範囲内 | |
6235 | + switch(CheckKanjiCode(Name, strlen(Name), KANJI_SJIS)) | |
6236 | + { | |
6237 | + case KANJI_JIS: | |
6238 | + PointJIS++; | |
6239 | + break; | |
6235 | 6240 | } |
6236 | 6241 | } |
6237 | 6242 | } |
@@ -1951,6 +1951,9 @@ static INT_PTR CALLBACK CodeSettingProc(HWND hDlg, UINT iMessage, WPARAM wParam, | ||
1951 | 1951 | SetRadioButtonByValue(hDlg, TmpHost.KanjiCode, KanjiButton, KANJIBUTTONS); |
1952 | 1952 | SendDlgItemMessage(hDlg, HSET_HANCNV, BM_SETCHECK, TmpHost.KanaCnv, 0); |
1953 | 1953 | SetRadioButtonByValue(hDlg, TmpHost.NameKanjiCode, NameKanjiButton, NAMEKANJIBUTTONS); |
1954 | + // UTF-8 HFS+対応 | |
1955 | + if(IsUnicodeNormalizationDllLoaded() == NO) | |
1956 | + EnableWindow(GetDlgItem(hDlg, HSET_FN_UTF8HFSX_CNV), FALSE); | |
1954 | 1957 | SendDlgItemMessage(hDlg, HSET_FN_HANCNV, BM_SETCHECK, TmpHost.NameKanaCnv, 0); |
1955 | 1958 | return(TRUE); |
1956 | 1959 |
@@ -342,6 +342,13 @@ | ||
342 | 342 | #define MSGJPN341 _Tu8("Enable or disable stateful FTP filtering of Windows Firewall.\nIt works only on Windows Vista or later.\nEnabling or disabling may improve communication conditions.\nChoose 'Yes' to enable or 'No' to disable it.", "Enable or disable stateful FTP filtering of Windows Firewall.\nIt works only on Windows Vista or later.\nEnabling or disabling may improve communication conditions.\nChoose 'Yes' to enable or 'No' to disable it.") |
343 | 343 | #define MSGJPN342 _Tu8("Failed to turn on/off stateful FTP filtering.", "Failed to turn on/off stateful FTP filtering.") |
344 | 344 | #define MSGJPN343 _Tu8("A corruption or tampering of the settings is detected.\nProblems such as settings loss or abnormal stop may occur if this is ignored to load.\nChoose 'Abort' to discard all settings.\nChoose 'Retry' to load settings as read only.\nChoose 'Ignore' to ignore this and load settings", "A corruption or tampering of the settings is detected.\nProblems such as settings loss or abnormal stop may occur if this is ignored to load.\nChoose 'Abort' to discard all settings.\nChoose 'Retry' to load settings as read only.\nChoose 'Ignore' to ignore this and load settings") |
345 | +#define MSGJPN344 _Tu8("Determination result of the filename Kanji code is %s.", "Determination result of the filename Kanji code is %s.") | |
346 | +#define MSGJPN345 _Tu8("Failed to determine the filename Kanji code.", "Failed to determine the filename Kanji code.") | |
347 | +#define MSGJPN346 _Tu8("Shift_JIS", "Shift_JIS") | |
348 | +#define MSGJPN347 _Tu8("JIS", "JIS") | |
349 | +#define MSGJPN348 _Tu8("EUC", "EUC") | |
350 | +#define MSGJPN349 _Tu8("UTF-8", "UTF-8") | |
351 | +#define MSGJPN350 _Tu8("UTF-8 HFS+", "UTF-8 HFS+") | |
345 | 352 | #if defined(HAVE_TANDEM) |
346 | 353 | #define MSGJPN2000 _Tu8("NonStop Server", "NonStop Server") |
347 | 354 | #define MSGJPN2001 _Tu8("OSS<->GUARDIAN Switch(&O)", "OSS<->GUARDIAN Switch(&O)") |
@@ -342,6 +342,13 @@ | ||
342 | 342 | #define MSGJPN341 _Tu8("WindowsファイアウォールのステートフルFTPフィルタの有効無効を設定します.\nこれはWindows Vista以降でのみ動作します.\n有効化または無効化することで通信状態が改善されることがあります.\n有効化するには「はい」,無効化するには「いいえ」を選択してください.", "Windows\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x82\xA2\xE3\x82\xA6\xE3\x82\xA9\xE3\x83\xBC\xE3\x83\xAB\xE3\x81\xAE\xE3\x82\xB9\xE3\x83\x86\xE3\x83\xBC\xE3\x83\x88\xE3\x83\x95\xE3\x83\xAB\x46TP\xE3\x83\x95\xE3\x82\xA3\xE3\x83\xAB\xE3\x82\xBF\xE3\x81\xAE\xE6\x9C\x89\xE5\x8A\xB9\xE7\x84\xA1\xE5\x8A\xB9\xE3\x82\x92\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x99.\n\xE3\x81\x93\xE3\x82\x8C\xE3\x81\xAFWindows Vista\xE4\xBB\xA5\xE9\x99\x8D\xE3\x81\xA7\xE3\x81\xAE\xE3\x81\xBF\xE5\x8B\x95\xE4\xBD\x9C\xE3\x81\x97\xE3\x81\xBE\xE3\x81\x99.\n\xE6\x9C\x89\xE5\x8A\xB9\xE5\x8C\x96\xE3\x81\xBE\xE3\x81\x9F\xE3\x81\xAF\xE7\x84\xA1\xE5\x8A\xB9\xE5\x8C\x96\xE3\x81\x99\xE3\x82\x8B\xE3\x81\x93\xE3\x81\xA8\xE3\x81\xA7\xE9\x80\x9A\xE4\xBF\xA1\xE7\x8A\xB6\xE6\x85\x8B\xE3\x81\x8C\xE6\x94\xB9\xE5\x96\x84\xE3\x81\x95\xE3\x82\x8C\xE3\x82\x8B\xE3\x81\x93\xE3\x81\xA8\xE3\x81\x8C\xE3\x81\x82\xE3\x82\x8A\xE3\x81\xBE\xE3\x81\x99.\n\xE6\x9C\x89\xE5\x8A\xB9\xE5\x8C\x96\xE3\x81\x99\xE3\x82\x8B\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE3\x81\xAF\xE3\x81\x84\xE3\x80\x8D,\xE7\x84\xA1\xE5\x8A\xB9\xE5\x8C\x96\xE3\x81\x99\xE3\x82\x8B\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE3\x81\x84\xE3\x81\x84\xE3\x81\x88\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.") |
343 | 343 | #define MSGJPN342 _Tu8("ステートフルFTPフィルタを設定できませんでした.", "\xE3\x82\xB9\xE3\x83\x86\xE3\x83\xBC\xE3\x83\x88\xE3\x83\x95\xE3\x83\xAB\x46TP\xE3\x83\x95\xE3\x82\xA3\xE3\x83\xAB\xE3\x82\xBF\xE3\x82\x92\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x81\xA7\xE3\x81\x8D\xE3\x81\xBE\xE3\x81\x9B\xE3\x82\x93\xE3\x81\xA7\xE3\x81\x97\xE3\x81\x9F.") |
344 | 344 | #define MSGJPN343 _Tu8("設定の破損または改竄が検出されました.\n無視して読み込むと異常停止や設定の消失などの不具合が発生する可能性があります.\n全ての設定を破棄するには「中止」を選択してください.\n読み取り専用で設定を読み込むには「再試行」を選択してください.\n無視して設定を読み込むには「無視」を選択してください.", "\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x81\xAE\xE7\xA0\xB4\xE6\x90\x8D\xE3\x81\xBE\xE3\x81\x9F\xE3\x81\xAF\xE6\x94\xB9\xE7\xAB\x84\xE3\x81\x8C\xE6\xA4\x9C\xE5\x87\xBA\xE3\x81\x95\xE3\x82\x8C\xE3\x81\xBE\xE3\x81\x97\xE3\x81\x9F.\n\xE7\x84\xA1\xE8\xA6\x96\xE3\x81\x97\xE3\x81\xA6\xE8\xAA\xAD\xE3\x81\xBF\xE8\xBE\xBC\xE3\x82\x80\xE3\x81\xA8\xE7\x95\xB0\xE5\xB8\xB8\xE5\x81\x9C\xE6\xAD\xA2\xE3\x82\x84\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x81\xAE\xE6\xB6\x88\xE5\xA4\xB1\xE3\x81\xAA\xE3\x81\xA9\xE3\x81\xAE\xE4\xB8\x8D\xE5\x85\xB7\xE5\x90\x88\xE3\x81\x8C\xE7\x99\xBA\xE7\x94\x9F\xE3\x81\x99\xE3\x82\x8B\xE5\x8F\xAF\xE8\x83\xBD\xE6\x80\xA7\xE3\x81\x8C\xE3\x81\x82\xE3\x82\x8A\xE3\x81\xBE\xE3\x81\x99.\n\xE5\x85\xA8\xE3\x81\xA6\xE3\x81\xAE\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x82\x92\xE7\xA0\xB4\xE6\xA3\x84\xE3\x81\x99\xE3\x82\x8B\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE4\xB8\xAD\xE6\xAD\xA2\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.\n\xE8\xAA\xAD\xE3\x81\xBF\xE5\x8F\x96\xE3\x82\x8A\xE5\xB0\x82\xE7\x94\xA8\xE3\x81\xA7\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x82\x92\xE8\xAA\xAD\xE3\x81\xBF\xE8\xBE\xBC\xE3\x82\x80\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE5\x86\x8D\xE8\xA9\xA6\xE8\xA1\x8C\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.\n\xE7\x84\xA1\xE8\xA6\x96\xE3\x81\x97\xE3\x81\xA6\xE8\xA8\xAD\xE5\xAE\x9A\xE3\x82\x92\xE8\xAA\xAD\xE3\x81\xBF\xE8\xBE\xBC\xE3\x82\x80\xE3\x81\xAB\xE3\x81\xAF\xE3\x80\x8C\xE7\x84\xA1\xE8\xA6\x96\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.") |
345 | +#define MSGJPN344 _Tu8("ファイル名の漢字コードの判別結果は%sです.", "\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\xE5\x90\x8D\xE3\x81\xAE\xE6\xBC\xA2\xE5\xAD\x97\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x89\xE3\x81\xAE\xE5\x88\xA4\xE5\x88\xA5\xE7\xB5\x90\xE6\x9E\x9C\xE3\x81\xAF%s\xE3\x81\xA7\xE3\x81\x99.") | |
346 | +#define MSGJPN345 _Tu8("ファイル名の漢字コードを判別できませんでした.", "\xE3\x83\x95\xE3\x82\xA1\xE3\x82\xA4\xE3\x83\xAB\xE5\x90\x8D\xE3\x81\xAE\xE6\xBC\xA2\xE5\xAD\x97\xE3\x82\xB3\xE3\x83\xBC\xE3\x83\x89\xE3\x82\x92\xE5\x88\xA4\xE5\x88\xA5\xE3\x81\xA7\xE3\x81\x8D\xE3\x81\xBE\xE3\x81\x9B\xE3\x82\x93\xE3\x81\xA7\xE3\x81\x97\xE3\x81\x9F.") | |
347 | +#define MSGJPN346 _Tu8("Shift_JIS", "Shift_JIS") | |
348 | +#define MSGJPN347 _Tu8("JIS", "JIS") | |
349 | +#define MSGJPN348 _Tu8("EUC", "EUC") | |
350 | +#define MSGJPN349 _Tu8("UTF-8", "UTF-8") | |
351 | +#define MSGJPN350 _Tu8("UTF-8 HFS+", "UTF-8 HFS+") | |
345 | 352 | #if defined(HAVE_TANDEM) |
346 | 353 | #define MSGJPN2000 _Tu8("NonStop Server", "NonStop Server") |
347 | 354 | #define MSGJPN2001 _Tu8("OSS<->GUARDIAN 切り替え(&O)", "OSS<->GUARDIAN \xE5\x88\x87\xE3\x82\x8A\xE6\x9B\xBF\xE3\x81\x88(&O)") |
@@ -1658,16 +1658,13 @@ int ChangeFnameRemote2Local(char *Fname, int Max) | ||
1658 | 1658 | |
1659 | 1659 | // UTF-8 HFS+対応 |
1660 | 1660 | case KANJI_UTF8HFSX : |
1661 | - if(IsUnicodeNormalizationDllLoaded()) | |
1662 | - { | |
1663 | - ConvUTF8HFSXtoUTF8N(&cInfo); | |
1664 | - *(Buf + cInfo.OutLen) = NUL; | |
1665 | - strcpy(Fname, Buf); | |
1666 | - Pos = strchr(Fname, NUL); | |
1667 | - FlushRestData(&cInfo); | |
1668 | - *(Buf + cInfo.OutLen) = NUL; | |
1669 | - strcpy(Pos, Buf); | |
1670 | - } | |
1661 | + ConvUTF8HFSXtoUTF8N(&cInfo); | |
1662 | + *(Buf + cInfo.OutLen) = NUL; | |
1663 | + strcpy(Fname, Buf); | |
1664 | + Pos = strchr(Fname, NUL); | |
1665 | + FlushRestData(&cInfo); | |
1666 | + *(Buf + cInfo.OutLen) = NUL; | |
1667 | + strcpy(Pos, Buf); | |
1671 | 1668 | break; |
1672 | 1669 | } |
1673 | 1670 | // バッファ上書きバグ対策 |
@@ -1840,16 +1837,13 @@ int ChangeFnameLocal2Remote(char *Fname, int Max) | ||
1840 | 1837 | |
1841 | 1838 | // UTF-8 HFS+対応 |
1842 | 1839 | case KANJI_UTF8HFSX : |
1843 | - if(IsUnicodeNormalizationDllLoaded()) | |
1844 | - { | |
1845 | - ConvUTF8NtoUTF8HFSX(&cInfo); | |
1846 | - *(Buf + cInfo.OutLen) = NUL; | |
1847 | - strcpy(Fname, Buf); | |
1848 | - Pos = strchr(Fname, NUL); | |
1849 | - FlushRestData(&cInfo); | |
1850 | - *(Buf + cInfo.OutLen) = NUL; | |
1851 | - strcpy(Pos, Buf); | |
1852 | - } | |
1840 | + ConvUTF8NtoUTF8HFSX(&cInfo); | |
1841 | + *(Buf + cInfo.OutLen) = NUL; | |
1842 | + strcpy(Fname, Buf); | |
1843 | + Pos = strchr(Fname, NUL); | |
1844 | + FlushRestData(&cInfo); | |
1845 | + *(Buf + cInfo.OutLen) = NUL; | |
1846 | + strcpy(Pos, Buf); | |
1853 | 1847 | break; |
1854 | 1848 | } |
1855 | 1849 | // バッファ上書きバグ対策 |