[PATCH] force to use UTF-8 for remote sftp and ftp

Moderator: Project members

Post Reply
Message
Author
twu2
425 Can't open data connection
Posts: 45
Joined: 2005-02-26 16:54

[PATCH] force to use UTF-8 for remote sftp and ftp

#1 Post by twu2 » 2005-03-13 15:24

Hi!

I just submit 3 patches to sourceforge.net for FileZilla. This will add an option in SiteManager Advance Dialog, to force use UTF-8 encode/decode for remote sftp/ftp server.

patch 1:
http://sourceforge.net/tracker/index.ph ... tid=372243

This patch will fix some buffer overflow while using sftp for unicode build.


patch 2:
http://sourceforge.net/tracker/index.ph ... tid=372243

This patch will let FzSFtp.exe work for unicode build.

patch 3:
http://sourceforge.net/tracker/index.ph ... tid=372243

This contain 2 patches:
1. filezilla_utf8.patch
2. filezilla_utf8_resource.patch.gz

first one patch will modify source code and English resource for add an UTF-8 option for SiteManager Advance dialog.
second one patch will modify all other language resource file for this option.

And, for unicode build, this patch change the IPC protocol between FileZilla.exe and FzSFtp.exe, it will convert the local file to UTF-8 encode in FileZilla.exe, then decode it to unicode string in FzSFtp.exe for both GET/PUT method.

I already test both ansi and unicode build, this patch work for me. (I can get correct Chinese and Japan filename in unicode build, of cause, for ansi build, I can only get correct Chinese filename because I'm using Chinese Windows XP...)

The status message will show UTF-8 encoding directly in sftp mode.

twu2
425 Can't open data connection
Posts: 45
Joined: 2005-02-26 16:54

#2 Post by twu2 » 2005-03-14 04:10

I submit another patch to avoid to show UTF-8 string in status window.

Another question, I also find the status windows will show ansi string only? In ShowStatus function, will convert string from unicode to ansi, this will cause some word lost for showing the string with different language. (for example, I can't show Japan string in status window if I running in Chinese window)

twu2
425 Can't open data connection
Posts: 45
Joined: 2005-02-26 16:54

#3 Post by twu2 » 2005-03-14 08:56

twu2 wrote:Another question, I also find the status windows will show ansi string only? In ShowStatus function, will convert string from unicode to ansi, this will cause some word lost for showing the string with different language. (for example, I can't show Japan string in status window if I running in Chinese window)
http://sourceforge.net/tracker/index.ph ... tid=372243
This patch will enable the unicode support for CStatusCtrl, so we can display unicode string in status window now.

Here is the unicode build binary file (include all above patch) for FileZilla.exe, FzSFtp.exe and Chineses DLL.
http://www.teatime.com.tw/~tommy/filezilla.zip

twu2
425 Can't open data connection
Posts: 45
Joined: 2005-02-26 16:54

#4 Post by twu2 » 2005-03-15 05:42

I've modified my patch for 2.2.12b.

patch for lost UTF8 option while use re-connect function in 2.2.12b:
http://sourceforge.net/tracker/index.ph ... tid=372243

patch for display unicode string in status window:
http://sourceforge.net/tracker/index.ph ... tid=372243

patch for use force UTF8 option for sftp:
http://sourceforge.net/tracker/index.ph ... tid=372243

Post Reply