diff -uNBb FileZilla_2_2_16_src_orig/source/ControlSocket.cpp FileZilla_2_2_16_src/source/ControlSocket.cpp
--- FileZilla_2_2_16_src_orig/source/ControlSocket.cpp	2005-06-17 23:16:16.000000000 +0900
+++ FileZilla_2_2_16_src/source/ControlSocket.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -27,7 +27,9 @@
 #include "AsyncSslSocketLayer.h"
 #include "AsyncGssSocketLayer.h"
 #include "SpeedLimit.h"
+#if 0
 #include <idna.h>
+#endif
 
 #ifdef _DEBUG
 #undef THIS_FILE
@@ -525,7 +527,7 @@
 CString CControlSocket::ConvertDomainName(CString domain)
 {
 	USES_CONVERSION;
-
+#if 0
 	LPCWSTR buffer = T2CW(domain);
 	
 	char *utf8 = new char[wcslen(buffer) * 2 + 2];
@@ -548,4 +550,6 @@
 	CString result = A2T(output);
 	free(output);
 	return result;
+#endif
+    return domain;
 }
\ No newline at end of file
diff -uNBb FileZilla_2_2_16_src_orig/source/FileZilla.sln FileZilla_2_2_16_src/source/FileZilla.sln
--- FileZilla_2_2_16_src_orig/source/FileZilla.sln	2005-03-20 01:51:46.000000000 +0900
+++ FileZilla_2_2_16_src/source/FileZilla.sln	2005-09-13 08:35:18.000000000 +0900
@@ -92,77 +92,58 @@
 		{6F21056F-9567-49CD-8D49-45AAFE04B10C}.Debug.ActiveCfg = Release|Win32
 		{6F21056F-9567-49CD-8D49-45AAFE04B10C}.Debug Unicode.ActiveCfg = Release|Win32
 		{6F21056F-9567-49CD-8D49-45AAFE04B10C}.Release.ActiveCfg = Release|Win32
-		{6F21056F-9567-49CD-8D49-45AAFE04B10C}.Release.Build.0 = Release|Win32
 		{14929121-DB37-45C1-9FDC-0733C3901333}.Debug.ActiveCfg = Release|Win32
 		{14929121-DB37-45C1-9FDC-0733C3901333}.Debug Unicode.ActiveCfg = Release|Win32
 		{14929121-DB37-45C1-9FDC-0733C3901333}.Release.ActiveCfg = Release|Win32
-		{14929121-DB37-45C1-9FDC-0733C3901333}.Release.Build.0 = Release|Win32
 		{8EFCF47C-2BCC-4205-AC85-C782F763590D}.Debug.ActiveCfg = Release|Win32
 		{8EFCF47C-2BCC-4205-AC85-C782F763590D}.Debug Unicode.ActiveCfg = Release|Win32
 		{8EFCF47C-2BCC-4205-AC85-C782F763590D}.Release.ActiveCfg = Release|Win32
-		{8EFCF47C-2BCC-4205-AC85-C782F763590D}.Release.Build.0 = Release|Win32
 		{2E49E78F-C2A7-4DA2-B288-281CECA458F9}.Debug.ActiveCfg = Release|Win32
 		{2E49E78F-C2A7-4DA2-B288-281CECA458F9}.Debug Unicode.ActiveCfg = Release|Win32
 		{2E49E78F-C2A7-4DA2-B288-281CECA458F9}.Release.ActiveCfg = Release|Win32
-		{2E49E78F-C2A7-4DA2-B288-281CECA458F9}.Release.Build.0 = Release|Win32
 		{633C6475-62C9-42BE-8763-0D3991B5C5D7}.Debug.ActiveCfg = Release|Win32
 		{633C6475-62C9-42BE-8763-0D3991B5C5D7}.Debug Unicode.ActiveCfg = Release|Win32
 		{633C6475-62C9-42BE-8763-0D3991B5C5D7}.Release.ActiveCfg = Release|Win32
-		{633C6475-62C9-42BE-8763-0D3991B5C5D7}.Release.Build.0 = Release|Win32
 		{17E16F5E-4E81-4FDF-A100-7BA3D251BBB9}.Debug.ActiveCfg = Release|Win32
 		{17E16F5E-4E81-4FDF-A100-7BA3D251BBB9}.Debug Unicode.ActiveCfg = Release|Win32
 		{17E16F5E-4E81-4FDF-A100-7BA3D251BBB9}.Release.ActiveCfg = Release|Win32
-		{17E16F5E-4E81-4FDF-A100-7BA3D251BBB9}.Release.Build.0 = Release|Win32
 		{D6845007-872C-4F8C-A65D-A4DA4B422AEA}.Debug.ActiveCfg = Release|Win32
 		{D6845007-872C-4F8C-A65D-A4DA4B422AEA}.Debug Unicode.ActiveCfg = Release|Win32
 		{D6845007-872C-4F8C-A65D-A4DA4B422AEA}.Release.ActiveCfg = Release|Win32
-		{D6845007-872C-4F8C-A65D-A4DA4B422AEA}.Release.Build.0 = Release|Win32
 		{E5CD43CC-6229-45F9-B09B-6FEE5E4B010E}.Debug.ActiveCfg = Release|Win32
 		{E5CD43CC-6229-45F9-B09B-6FEE5E4B010E}.Debug Unicode.ActiveCfg = Release|Win32
 		{E5CD43CC-6229-45F9-B09B-6FEE5E4B010E}.Release.ActiveCfg = Release|Win32
-		{E5CD43CC-6229-45F9-B09B-6FEE5E4B010E}.Release.Build.0 = Release|Win32
 		{7A92C9C5-EEB6-43CC-AA2D-3A2D9F0B1B61}.Debug.ActiveCfg = Release|Win32
 		{7A92C9C5-EEB6-43CC-AA2D-3A2D9F0B1B61}.Debug Unicode.ActiveCfg = Release|Win32
 		{7A92C9C5-EEB6-43CC-AA2D-3A2D9F0B1B61}.Release.ActiveCfg = Release|Win32
-		{7A92C9C5-EEB6-43CC-AA2D-3A2D9F0B1B61}.Release.Build.0 = Release|Win32
 		{06DD0594-3B97-4A94-8961-D35269A0FAC8}.Debug.ActiveCfg = Release|Win32
 		{06DD0594-3B97-4A94-8961-D35269A0FAC8}.Debug Unicode.ActiveCfg = Release|Win32
 		{06DD0594-3B97-4A94-8961-D35269A0FAC8}.Release.ActiveCfg = Release|Win32
-		{06DD0594-3B97-4A94-8961-D35269A0FAC8}.Release.Build.0 = Release|Win32
 		{D0A3379E-17D4-45D1-9C3F-D225C86AF3A0}.Debug.ActiveCfg = Release|Win32
 		{D0A3379E-17D4-45D1-9C3F-D225C86AF3A0}.Debug Unicode.ActiveCfg = Release|Win32
 		{D0A3379E-17D4-45D1-9C3F-D225C86AF3A0}.Release.ActiveCfg = Release|Win32
-		{D0A3379E-17D4-45D1-9C3F-D225C86AF3A0}.Release.Build.0 = Release|Win32
 		{29B9AD15-5BB3-4880-BD11-859CF3368CCF}.Debug.ActiveCfg = Release|Win32
 		{29B9AD15-5BB3-4880-BD11-859CF3368CCF}.Debug Unicode.ActiveCfg = Release|Win32
 		{29B9AD15-5BB3-4880-BD11-859CF3368CCF}.Release.ActiveCfg = Release|Win32
-		{29B9AD15-5BB3-4880-BD11-859CF3368CCF}.Release.Build.0 = Release|Win32
 		{89D2C764-FAC3-4F24-9D6A-2001FA832B72}.Debug.ActiveCfg = Release|Win32
 		{89D2C764-FAC3-4F24-9D6A-2001FA832B72}.Debug Unicode.ActiveCfg = Release|Win32
 		{89D2C764-FAC3-4F24-9D6A-2001FA832B72}.Release.ActiveCfg = Release|Win32
-		{89D2C764-FAC3-4F24-9D6A-2001FA832B72}.Release.Build.0 = Release|Win32
 		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Debug.ActiveCfg = Release|Win32
-		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Debug.Build.0 = Release|Win32
 		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Debug Unicode.ActiveCfg = Release Unicode|Win32
-		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Debug Unicode.Build.0 = Release Unicode|Win32
 		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Release.ActiveCfg = Release|Win32
 		{21B5E183-5B28-4DE0-9DBC-67842FDA0BF8}.Release.Build.0 = Release|Win32
 		{4448FF75-A85A-4F5B-85B4-94A209C93161}.Debug.ActiveCfg = Release|Win32
 		{4448FF75-A85A-4F5B-85B4-94A209C93161}.Debug Unicode.ActiveCfg = Release|Win32
 		{4448FF75-A85A-4F5B-85B4-94A209C93161}.Release.ActiveCfg = Release|Win32
-		{4448FF75-A85A-4F5B-85B4-94A209C93161}.Release.Build.0 = Release|Win32
 		{295602B9-2ECA-44B7-BFAE-71685B734B35}.Debug.ActiveCfg = Release|Win32
 		{295602B9-2ECA-44B7-BFAE-71685B734B35}.Debug Unicode.ActiveCfg = Release|Win32
 		{295602B9-2ECA-44B7-BFAE-71685B734B35}.Release.ActiveCfg = Release|Win32
-		{295602B9-2ECA-44B7-BFAE-71685B734B35}.Release.Build.0 = Release|Win32
 		{E95192F3-54D1-433D-BC91-00305EE0B83E}.Debug.ActiveCfg = Release|Win32
 		{E95192F3-54D1-433D-BC91-00305EE0B83E}.Debug Unicode.ActiveCfg = Release|Win32
 		{E95192F3-54D1-433D-BC91-00305EE0B83E}.Release.ActiveCfg = Release|Win32
-		{E95192F3-54D1-433D-BC91-00305EE0B83E}.Release.Build.0 = Release|Win32
 		{647F026E-6202-4031-9C24-E5613620B30B}.Debug.ActiveCfg = Release|Win32
 		{647F026E-6202-4031-9C24-E5613620B30B}.Debug Unicode.ActiveCfg = Release|Win32
 		{647F026E-6202-4031-9C24-E5613620B30B}.Release.ActiveCfg = Release|Win32
-		{647F026E-6202-4031-9C24-E5613620B30B}.Release.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 	EndGlobalSection
diff -uNBb FileZilla_2_2_16_src_orig/source/FileZilla.vcproj FileZilla_2_2_16_src/source/FileZilla.vcproj
--- FileZilla_2_2_16_src_orig/source/FileZilla.vcproj	2005-03-20 01:51:46.000000000 +0900
+++ FileZilla_2_2_16_src/source/FileZilla.vcproj	2005-09-13 08:35:18.000000000 +0900
@@ -116,10 +116,11 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="zlib.lib version.lib ws2_32.lib libidn.a"
+				AdditionalDependencies="zlib.lib version.lib ws2_32.lib"
 				OutputFile=".\Release/FileZilla.exe"
 				LinkIncremental="1"
 				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="MSVCRTD"
 				GenerateDebugInformation="TRUE"
 				ProgramDatabaseFile=".\Release/FileZilla.pdb"
 				GenerateMapFile="TRUE"
@@ -188,7 +189,7 @@
 				Name="VCCustomBuildTool"/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="zlibd.lib version.lib ws2_32.lib libidn.a"
+				AdditionalDependencies="zlib.lib version.lib ws2_32.lib"
 				OutputFile=".\Debug/FileZilla.exe"
 				LinkIncremental="2"
 				SuppressStartupBanner="TRUE"
@@ -2344,6 +2345,9 @@
 				</FileConfiguration>
 			</File>
 			<File
+				RelativePath=".\StringTool.cpp">
+			</File>
+			<File
 				RelativePath="structures.cpp">
 				<FileConfiguration
 					Name="Debug Unicode|Win32">
diff -uNBb FileZilla_2_2_16_src_orig/source/FtpControlSocket.cpp FileZilla_2_2_16_src/source/FtpControlSocket.cpp
--- FileZilla_2_2_16_src_orig/source/FtpControlSocket.cpp	2005-06-09 01:51:18.000000000 +0900
+++ FileZilla_2_2_16_src/source/FtpControlSocket.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -31,6 +31,8 @@
 #include "filezillaapi.h"
 #include "misc/utf8.h"
 
+#include "StringTool.h"
+
 #ifdef _DEBUG
 #define new DEBUG_NEW
 #undef THIS_FILE
@@ -1001,6 +1003,7 @@
 	}
 	else
 	{
+        str = CStringTool::LOCALtoREMOTE(str);
 		LPCSTR lpszAsciiSend = T2CA(str);
 
 		int sendLen = strlen(lpszAsciiSend);
diff -uNBb FileZilla_2_2_16_src_orig/source/FtpListResult.cpp FileZilla_2_2_16_src/source/FtpListResult.cpp
--- FileZilla_2_2_16_src_orig/source/FtpListResult.cpp	2005-09-12 21:28:26.000000000 +0900
+++ FileZilla_2_2_16_src/source/FtpListResult.cpp	2005-09-13 08:41:32.000000000 +0900
@@ -26,6 +26,8 @@
 #include "Options.h"
 #include "misc/utf8.h"
 
+#include "StringTool.h"
+
 #ifdef _DEBUG
 #undef THIS_FILE
 static char THIS_FILE[]=__FILE__;
@@ -226,25 +228,6 @@
 	//Austrian month names
 	m_MonthNamesMap[_T("jän")] = 1;
 	
-	//French month names
-	m_MonthNamesMap[_T("janv")] = 1;
-	m_MonthNamesMap[_T("féb")] = 1;
-	m_MonthNamesMap[_T("fév")] = 2;
-	m_MonthNamesMap[_T("fev")] = 2;
-	m_MonthNamesMap[_T("févr")] = 2;
-	m_MonthNamesMap[_T("fevr")] = 2;
-	m_MonthNamesMap[_T("mars")] = 3;
-	m_MonthNamesMap[_T("mrs")] = 3;
-	m_MonthNamesMap[_T("avr")] = 4;
-	m_MonthNamesMap[_T("juin")] = 6;
-	m_MonthNamesMap[_T("juil")] = 7;
-	m_MonthNamesMap[_T("jui")] = 7;
-	m_MonthNamesMap[_T("aoû")] = 8;
-	m_MonthNamesMap[_T("août")] = 8;
-	m_MonthNamesMap[_T("aout")] = 8;
-	m_MonthNamesMap[_T("déc")] = 12;
-	m_MonthNamesMap[_T("dec")] = 12;
-	
 	//Italian month names
 	m_MonthNamesMap[_T("gen")] = 1;
 	m_MonthNamesMap[_T("mag")] = 5;
@@ -267,32 +250,6 @@
 	m_MonthNamesMap[_T("nbre")] = 9;
 	m_MonthNamesMap[_T("dbre")] = 9;
 
-	//Polish month names
-	m_MonthNamesMap[_T("sty")] = 1;
-	m_MonthNamesMap[_T("lut")] = 2;
-	m_MonthNamesMap[_T("kwi")] = 4;
-	m_MonthNamesMap[_T("maj")] = 5;
-	m_MonthNamesMap[_T("cze")] = 6;
-	m_MonthNamesMap[_T("lip")] = 7;
-	m_MonthNamesMap[_T("sie")] = 8;
-	m_MonthNamesMap[_T("wrz")] = 9;
-	m_MonthNamesMap[_T("paŸ")] = 10;
-	m_MonthNamesMap[_T("lis")] = 11;
-	m_MonthNamesMap[_T("gru")] = 12;
-
-	//Russian month names
-	m_MonthNamesMap[_T("ÿíâ")] = 1;
-	m_MonthNamesMap[_T("ôåâ")] = 2;
-	m_MonthNamesMap[_T("ìàð")] = 3;
-	m_MonthNamesMap[_T("àïð")] = 4;
-	m_MonthNamesMap[_T("ìàé")] = 5;
-	m_MonthNamesMap[_T("èþí")] = 6;
-	m_MonthNamesMap[_T("èþë")] = 7;
-	m_MonthNamesMap[_T("àâã")] = 8;
-	m_MonthNamesMap[_T("ñåí")] = 9;
-	m_MonthNamesMap[_T("îêò")] = 10;
-	m_MonthNamesMap[_T("íîÿ")] = 11;
-	m_MonthNamesMap[_T("äåê")] = 12;
 
 	//Dutch month names
 	m_MonthNamesMap[_T("mrt")] = 3;
@@ -329,6 +286,21 @@
 	m_MonthNamesMap[_T("11\xC6\xD4")] = 11;
 	m_MonthNamesMap[_T("12\xC6\xD4")] = 12;
 
+
+	//Japanese month names(EUC)
+	m_MonthNamesMap[_T("1\xb7\xee")] = 1;
+	m_MonthNamesMap[_T("2\xb7\xee")] = 2;
+	m_MonthNamesMap[_T("3\xb7\xee")] = 3;
+	m_MonthNamesMap[_T("4\xb7\xee")] = 4;
+	m_MonthNamesMap[_T("5\xb7\xee")] = 5;
+	m_MonthNamesMap[_T("6\xb7\xee")] = 6;
+	m_MonthNamesMap[_T("7\xb7\xee")] = 7;
+	m_MonthNamesMap[_T("8\xb7\xee")] = 8;
+	m_MonthNamesMap[_T("9\xb7\xee")] = 9;
+	m_MonthNamesMap[_T("10\xb7\xee")] = 10;
+	m_MonthNamesMap[_T("11\xb7\xee")] = 11;
+	m_MonthNamesMap[_T("12\xb7\xee")] = 12;
+
 	//There are more languages and thus month 
 	//names, but as long knowbody reports a 
 	//problem, I won't add them, there are way 
@@ -393,6 +365,7 @@
 		strcpy(tmpline, line); 
 		if (parseLine(tmpline, strlen(tmpline), direntry, tmp))
 		{
+            direntry.name = CStringTool::REMOTEtoLOCAL(direntry.name);
 			delete [] tmpline;
 			if (tmp)
 				m_server.nServerType |= tmp;
@@ -555,6 +528,7 @@
 		strcpy(tmpline, line); 
 		if (parseLine(tmpline, strlen(tmpline), direntry, tmp))
 		{
+	        direntry.name = CStringTool::REMOTEtoLOCAL(direntry.name);
 			delete [] tmpline;
 			if (tmp)
 				m_server.nServerType |= tmp;
Common subdirectories: FileZilla_2_2_16_src_orig/source/FzSFtp and FileZilla_2_2_16_src/source/FzSFtp
Common subdirectories: FileZilla_2_2_16_src_orig/source/LanguageDLLs and FileZilla_2_2_16_src/source/LanguageDLLs
Common subdirectories: FileZilla_2_2_16_src_orig/source/Release and FileZilla_2_2_16_src/source/Release
diff -uNBb FileZilla_2_2_16_src_orig/source/SFtpIpc.cpp FileZilla_2_2_16_src/source/SFtpIpc.cpp
--- FileZilla_2_2_16_src_orig/source/SFtpIpc.cpp	2004-10-27 23:23:22.000000000 +0900
+++ FileZilla_2_2_16_src/source/SFtpIpc.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -25,6 +25,8 @@
 #include "sftpcontrolsocket.h"
 #include "SFtpCommandIDs.h"
 
+#include "StringTool.h"
+
 #ifdef _DEBUG
 #undef THIS_FILE
 static char THIS_FILE[]=__FILE__;
@@ -416,9 +418,13 @@
 
 BOOL CSFtpIpc::Send(const DWORD &nID, LPCTSTR str)
 {
+
 	USES_CONVERSION;
-	if (str)
-		return Send(nID, (const DWORD)strlen(T2CA(str))+1, (LPVOID)T2CA(str));
+    if (str){
+        CString strTmp(str);        
+        strTmp = CStringTool::LOCALtoREMOTE(strTmp);
+		return Send(nID, (const DWORD)strlen(T2CA(strTmp))+1, (LPVOID)T2CA(strTmp));
+    }
 	else
 		return Send(nID, 0, 0);
 }
diff -uNBb FileZilla_2_2_16_src_orig/source/ServerPath.cpp FileZilla_2_2_16_src/source/ServerPath.cpp
--- FileZilla_2_2_16_src_orig/source/ServerPath.cpp	2005-06-09 01:51:18.000000000 +0900
+++ FileZilla_2_2_16_src/source/ServerPath.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -23,6 +23,7 @@
 #include "stdafx.h"
 #include "ServerPath.h"
 #include "structures.h"
+#include "StringTool.h"
 
 #ifdef _DEBUG
 #undef THIS_FILE
@@ -79,6 +80,7 @@
 CServerPath::CServerPath(CString path, int nServerType)
 {
 	m_nServerType = nServerType;
+    path = CStringTool::REMOTEtoLOCAL(path); // not neccessary?
 	path.TrimLeft( _T(" ") );
 	path.TrimRight( _T(" ") );
 	if (path == "")
@@ -745,6 +747,7 @@
 CServerPath::CServerPath(CString subdir, const CServerPath &parent)
 {
 	*this=parent;
+    subdir = CStringTool::REMOTEtoLOCAL(subdir); // not neccessary?
 	subdir.TrimLeft( _T(" ") );
 	subdir.TrimRight( _T(" ") );
 
@@ -1247,6 +1250,8 @@
 
 BOOL CServerPath::SetPath(CString newpath)
 {
+
+    newpath = CStringTool::REMOTEtoLOCAL(newpath);
 	return SetPath(newpath, FALSE);
 }
 
diff -uNBb FileZilla_2_2_16_src_orig/source/SftpControlSocket.cpp FileZilla_2_2_16_src/source/SftpControlSocket.cpp
--- FileZilla_2_2_16_src_orig/source/SftpControlSocket.cpp	2005-03-17 23:11:28.000000000 +0900
+++ FileZilla_2_2_16_src/source/SftpControlSocket.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -28,6 +28,7 @@
 #include "SFtpCommandIDs.h"
 #include "FtpListResult.h"
 #include "FileExistsDlg.h"
+#include "StringTool.h"
 
 #ifdef _DEBUG
 #undef THIS_FILE
@@ -286,6 +287,8 @@
 
 void CSFtpControlSocket::List(BOOL bFinish, int nError /*=0*/, CServerPath path /*=CServerPath()*/, CString subdir /*=""*/, int nListMode /*=0*/)
 {
+//TRACE("List subdir: %s ... \n", (LPCTSTR)subdir);
+
 	LogMessage(__FILE__, __LINE__, this,FZ_LOG_DEBUG, _T("List(%s,%d,\"%s\",\"%s\",%d)"),bFinish?_T("TRUE"):_T("FALSE"),nError,path.GetPath(),subdir,nListMode);
 
 	USES_CONVERSION;
@@ -1338,6 +1341,7 @@
 			filename = pData->transferfile.remotefile;
 		else
 			filename = pData->transferfile.remotepath.GetPath() + pData->transferfile.remotefile;
+        filename = CStringTool::LOCALtoREMOTE(filename);
 		int nLen1 = strlen(T2CA(filename)) + 1;
 		int nLen2 = strlen(T2CA(pData->transferfile.localfile)) + 1;
 		char *pCmd=new char[nLen1+nLen2+4];
@@ -1510,17 +1514,17 @@
 		char *pData;
 		if (newPath.IsEmpty())
 		{
-			nLen = _tcslen( path.GetPath() + oldName + path.GetPath() + newName) + 2;
+		    nLen = _tcslen( CStringTool::LOCALtoREMOTE(path.GetPath() + oldName + path.GetPath() + newName)) + 2;
 			pData = new char[nLen];
-			strcpy(pData, T2CA(path.GetPath() + oldName));
-			strcpy(pData + _tcslen(path.GetPath() + oldName) + 1, T2CA(path.GetPath() + newName));
+			strcpy(pData, T2CA(CStringTool::LOCALtoREMOTE(path.GetPath() + oldName)));
+			strcpy(pData + _tcslen(CStringTool::LOCALtoREMOTE(path.GetPath() + oldName)) + 1, T2CA(CStringTool::LOCALtoREMOTE(path.GetPath() + newName)));
 		}
 		else
 		{
-			nLen = _tcslen( path.GetPath() + oldName + newPath.GetPath() + newName) + 2;
+			nLen = _tcslen(CStringTool::LOCALtoREMOTE( path.GetPath() + oldName + newPath.GetPath() + newName)) + 2;
 			pData = new char[nLen];
-			strcpy(pData, T2CA(path.GetPath() + oldName));
-			strcpy(pData + _tcslen(path.GetPath() + oldName) + 1, T2CA(newPath.GetPath() + newName));
+			strcpy(pData, T2CA(CStringTool::LOCALtoREMOTE(path.GetPath() + oldName)));
+			strcpy(pData + _tcslen(CStringTool::LOCALtoREMOTE(path.GetPath() + oldName)) + 1, T2CA(CStringTool::LOCALtoREMOTE(newPath.GetPath() + newName)));
 		}
 		if (!m_pDataChannel->Send(SFTP_DATAID_STC_RENAME, nLen, pData))
 		{
@@ -1782,7 +1786,7 @@
 			pData->Current.AddSubdir(pData->Segments.front());
 			CString Segment=pData->Segments.front();
 			pData->Segments.pop_front();
-			if (!m_pDataChannel->Send(SFTP_DATAID_STC_MKD,Segment))
+			if (!m_pDataChannel->Send(SFTP_DATAID_STC_MKD, Segment))
 			{
 				DoClose();
 				return;
@@ -2923,7 +2927,7 @@
 	USES_CONVERSION;
 	m_Operation.nOpMode=CSMODE_CHMOD;
 	CString str;
-	str.Format( _T("%d %s%s"), nValue, path.GetPath(), filename);
+	str.Format( _T("%d %s%s"), nValue, CStringTool::LOCALtoREMOTE(path.GetPath()), CStringTool::LOCALtoREMOTE(filename));
 	int nLen = strlen(T2CA(str)) + 1;
 	char *pData=new char[nLen];
 	strcpy(pData, T2CA(str));
diff -uNBb FileZilla_2_2_16_src_orig/source/StringTool.cpp FileZilla_2_2_16_src/source/StringTool.cpp
--- FileZilla_2_2_16_src_orig/source/StringTool.cpp	1970-01-01 09:00:00.000000000 +0900
+++ FileZilla_2_2_16_src/source/StringTool.cpp	2005-09-13 08:35:18.000000000 +0900
@@ -0,0 +1,158 @@
+#include "stdafx.h"
+#include "StringTool.h"
+#if 0
+#include "iconv.h"
+#endif
+namespace CStringTool
+{
+#if 1
+static BOOL IsSJIS_Kanji(BYTE ch)
+{
+    return _ismbblead( (WORD)ch) != 0 ? TRUE:FALSE;
+}
+
+static BOOL IsSJIS_Kana(BYTE ch)
+{
+    return _ismbbkana( (WORD)ch) != 0 ? TRUE:FALSE;
+}
+const CString LOCALtoREMOTE(const CString& str)
+{
+    CString strRet;
+    BYTE ch1;
+    BYTE ch2;
+    WORD wcode;
+
+    for( int i = 0; i < str.GetLength(); i++)
+    {
+        ch1 = str[i];
+        if( IsSJIS_Kanji( ch1) == TRUE)
+        {
+            i++;
+            ch2 = str[i];
+
+			wcode = MAKEWORD( ch2, ch1);
+            wcode = _mbcjmstojis( wcode);
+
+            ch1 = HIBYTE( wcode) | 0x80;
+            ch2 = LOBYTE( wcode) | 0x80;
+            strRet += ch1;
+            strRet += ch2;
+        }
+
+        else if( IsSJIS_Kana( ch1) == TRUE)
+        {
+
+            strRet += (BYTE)0x8e;
+            strRet += ch1;
+        }
+        else
+        {
+            strRet += ch1;
+        }
+    }
+    return strRet;
+}
+
+static BOOL IsJIS_Kana(BYTE ch)
+{
+    return ch == 0x8e ? TRUE:FALSE;
+}
+
+
+static BOOL IsJIS_Kanji(BYTE ch)
+{
+    return (ch >=0x21 && ch <=0x7e) ? TRUE:FALSE;
+}
+
+
+const CString REMOTEtoLOCAL(const CString& str)
+{
+   CString strRet;
+   BYTE ch1;
+   BYTE ch2;
+   WORD wcode;
+
+   for( int i = 0; i < str.GetLength(); i++)
+   {
+      ch1 = str[i];
+
+      if( IsJIS_Kana( ch1) == TRUE)
+      {
+         i++;
+         ch2 = str[i];
+
+         strRet += ch2;
+      }
+
+      else if( IsJIS_Kanji( ch1 ^ 0x80) == TRUE)
+      {
+         i++;
+         ch1 ^= 0x80;
+         ch2 = str[i] ^ 0x80;
+         wcode = MAKEWORD( ch2, ch1);
+         wcode = _mbcjistojms( wcode);
+         strRet += HIBYTE( wcode);
+         strRet += LOBYTE( wcode);
+      }
+      else
+      {
+         strRet += ch1;
+      }
+   }
+   return strRet;
+}
+#else
+#define MAX_PATH_LEN 1024
+static const CString do_iconv(const CString& str, const char* tocode, const char* fromcode)
+{
+
+    CString strRet;
+	iconv_t cd =iconv_open(tocode, fromcode);
+	if(cd==(iconv_t)-1){
+		TRACE("error: iconv_open");
+		return str;
+	}
+
+	char inbuf[MAX_PATH_LEN+1];
+	if(strlen(str) > MAX_PATH_LEN){
+		return str;	
+	}
+//	_tcscpy(inbuf, str);
+	strncpy(inbuf, str, MAX_PATH_LEN+1);
+	size_t inbytesleft = strlen(inbuf)+1;
+	char outbuf[MAX_PATH_LEN+1];
+    size_t outbytesleft = MAX_PATH_LEN+1;
+
+	const char* inbuf_p = (char*)&inbuf;
+	char* outbuf_p = (char*)&outbuf;
+
+	size_t nconv = iconv(cd, &inbuf_p, &inbytesleft,
+	&outbuf_p, &outbytesleft);
+
+	if(nconv == (size_t)-1){
+		TRACE("errno: %d\n", errno);
+    	TRACE("error: iconv\n");
+    	TRACE("%s\n", inbuf);
+
+		return str;
+	}
+
+	iconv_close(cd);
+	strRet = outbuf;
+
+    return strRet;
+}
+#undef MAX_PATH_LEN
+
+const CString REMOTEtoLOCAL(const CString& str)
+{
+	return do_iconv(str, LOCAL_ENCODING, REMOTE_ENCODING);
+}
+
+const CString LOCALtoREMOTE(const CString& str)
+{
+	return do_iconv(str, REMOTE_ENCODING, LOCAL_ENCODING);
+}
+
+#endif
+}
diff -uNBb FileZilla_2_2_16_src_orig/source/StringTool.h FileZilla_2_2_16_src/source/StringTool.h
--- FileZilla_2_2_16_src_orig/source/StringTool.h	1970-01-01 09:00:00.000000000 +0900
+++ FileZilla_2_2_16_src/source/StringTool.h	2005-09-13 08:35:18.000000000 +0900
@@ -0,0 +1,9 @@
+
+namespace CStringTool{
+
+	const char * const REMOTE_ENCODING = "EUC-JP";
+	const char * const LOCAL_ENCODING = "SHIFT_JIS";
+
+	const CString LOCALtoREMOTE(const CString& str);
+	const CString REMOTEtoLOCAL(const CString& str);
+}
\ No newline at end of file
Common subdirectories: FileZilla_2_2_16_src_orig/source/documentation and FileZilla_2_2_16_src/source/documentation
Common subdirectories: FileZilla_2_2_16_src_orig/source/gss and FileZilla_2_2_16_src/source/gss
Common subdirectories: FileZilla_2_2_16_src_orig/source/install and FileZilla_2_2_16_src/source/install
Common subdirectories: FileZilla_2_2_16_src_orig/source/misc and FileZilla_2_2_16_src/source/misc
Common subdirectories: FileZilla_2_2_16_src_orig/source/openssl and FileZilla_2_2_16_src/source/openssl
Common subdirectories: FileZilla_2_2_16_src_orig/source/res and FileZilla_2_2_16_src/source/res
