UTF8 problem.

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
dennissimo
Junior Member
Junior Member
Posts: 2
Joined: 2012-11-29, 21:04 UTC

UTF8 problem.

Post by *dennissimo »

Hello everyone!

I'm running gene6 as ftp server. UTF-8 works fine for desktop ftp clients (I tested on Filezilla and Total Commander) but doesn't work for android version (I've tried both versions 1.03 and the latest 2.0 with ftp plugin version 1.01).

Here is ftp server log:

Code: Select all

12/11/30 03:48:47, 19, 192.168.1.20, , new connection from 192.168.1.20 on 192.168.1.2:54990 (Implicit SSL)
12/11/30 03:48:47, 19, 192.168.1.20, , establishing encrypted session
12/11/30 03:48:52, 19, 192.168.1.20, , hostname resolved : xperia.wlan
12/11/30 03:48:52, 19, 192.168.1.20, , sending welcome message.
12/11/30 03:48:52, 19, 192.168.1.20, , 220 private ftp server, stay away if you are not invited.
12/11/30 03:48:52, 19, 192.168.1.20, , USER testftp
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 331 Password required for testftp.
12/11/30 03:48:52, 19, 192.168.1.20, testftp, PASS ****
12/11/30 03:48:52, 19, 192.168.1.20, testftp, logged in as "testftp".
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 230 User testftp logged in.
12/11/30 03:48:52, 19, 192.168.1.20, testftp, PBSZ 0
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 200 PBSZ=0
12/11/30 03:48:52, 19, 192.168.1.20, testftp, PROT P
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 200 PROT command successful.
12/11/30 03:48:52, 19, 192.168.1.20, testftp, OPTS UTF8 ON
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 501 Please CLNT first.
12/11/30 03:48:52, 19, 192.168.1.20, testftp, SYST
12/11/30 03:48:52, 19, 192.168.1.20, testftp, 215 UNIX Type: L8
If I connect to ftp with Total Commander for desktop utf8 option works as it should and log shows as:

Code: Select all

12/11/30 03:51:56, 21, 192.168.1.2, testftp, PBSZ 0
12/11/30 03:51:56, 21, 192.168.1.2, testftp, 200 PBSZ=0
12/11/30 03:51:56, 21, 192.168.1.2, testftp, PROT P
12/11/30 03:51:56, 21, 192.168.1.2, testftp, 200 PROT command successful.
12/11/30 03:51:56, 21, 192.168.1.2, testftp, CLNT Total Commander (UTF-8)
12/11/30 03:51:56, 21, 192.168.1.2, testftp, 200 Noted.
12/11/30 03:51:56, 21, 192.168.1.2, testftp, OPTS UTF8 ON
12/11/30 03:51:56, 21, 192.168.1.2, testftp, 200 UTF8 OPTS ON
I guess the problem is that ftp plugin doesn't send CLNT before OPTS UTF8 ON. So I've tried to manually specify commands to send on connect as mentioned in wiki.

I filled string as: CLNT Total Commander (UTF-8) Unfortunately Command CLNT alone didn't solve problem because it is executed after OPTS UTF8 ON. Ftp log:

Code: Select all

12/11/30 04:03:53, 22, 192.168.1.20, testftp, PROT P
12/11/30 04:03:53, 22, 192.168.1.20, testftp, 200 PROT command successful.
12/11/30 04:03:53, 22, 192.168.1.20, testftp, OPTS UTF8 ON
12/11/30 04:03:53, 22, 192.168.1.20, testftp, 501 Please CLNT first.
12/11/30 04:03:53, 22, 192.168.1.20, testftp, SYST
12/11/30 04:03:53, 22, 192.168.1.20, testftp, 215 UNIX Type: L8
12/11/30 04:03:53, 22, 192.168.1.20, testftp, CLNT Total Commander (UTF-8)
12/11/30 04:03:53, 22, 192.168.1.20, testftp, 200 Noted.
12/11/30 04:03:53, 22, 192.168.1.20, testftp, CWD /
Then I tried to specify multiple commands string as: CLNT Total Commander (UTF-8);OPTS UTF8 ON
In this case ftp plugin stucks on connection dialog and then I have to close total commander or ftp plugin in android application managment. Ftp log:

Code: Select all

12/11/30 04:17:07, 23, 192.168.1.20, testftp, PROT P
12/11/30 04:17:07, 23, 192.168.1.20, testftp, 200 PROT command successful.
12/11/30 04:17:07, 23, 192.168.1.20, testftp, OPTS UTF8 ON
12/11/30 04:17:07, 23, 192.168.1.20, testftp, 501 Please CLNT first.
12/11/30 04:17:07, 23, 192.168.1.20, testftp, SYST
12/11/30 04:17:07, 23, 192.168.1.20, testftp, 215 UNIX Type: L8
12/11/30 04:17:07, 23, 192.168.1.20, testftp, CLNT Total Commander (UTF-8)
12/11/30 04:17:07, 23, 192.168.1.20, testftp, 200 Noted.
12/11/30 04:17:17, 23, 192.168.1.20, testftp, disconnected. (00d00:00:15)
Please help me figure out way to enable UTF8 support or run multiple commads on connect (I tried other commands separated with a ; and the result was stucked ftp plugin). Thanks in advance!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

That's a strange server to need CLNT command to understand OPTS UTF8 ON - this simply makes no sense...

You can try to enable UTF-8 manually in the settings of the connection. If the server uses UTF-8 by default, TC will be able to interpret it correctly.
Author of Total Commander
https://www.ghisler.com
dennissimo
Junior Member
Junior Member
Posts: 2
Joined: 2012-11-29, 21:04 UTC

Post by *dennissimo »

Thanks for reply!

Yes, I know that it is ftp server issue and not total commander. There are posts on gene6 forum about this issue. I can't post links here but it is not hard to find them. They are dated 2005 and 2006 but sadly nothing has changed from that time :( I tried another ftp server and utf8 works without CLNT before OPTS UTF8 ON.

I also tried to enabled UTF-8 in servers settings but it didn't help me. Ftp log:

Code: Select all

12/12/01 13:47:29, 36, 192.168.1.20, testftp, PBSZ 0
12/12/01 13:47:29, 36, 192.168.1.20, testftp, 200 PBSZ=0
12/12/01 13:47:29, 36, 192.168.1.20, testftp, PROT P
12/12/01 13:47:29, 36, 192.168.1.20, testftp, 200 PROT command successful.
12/12/01 13:47:29, 36, 192.168.1.20, testftp, OPTS UTF8 ON
12/12/01 13:47:29, 36, 192.168.1.20, testftp, 501 Please CLNT first.
12/12/01 13:47:29, 36, 192.168.1.20, testftp, SYST
12/12/01 13:47:29, 36, 192.168.1.20, testftp, 215 UNIX Type: L8
The thing is that ftp clients on my desktop and notebook (as I mentioned I tried Filezilla and Total Commander for Windows) work in utf8 mode normally because they send CLNT before OPTS UTF8.

Running multiple commands on connect could solve my problem but when I specify CLNT Total Commander (UTF-8);OPTS UTF8 ON ftp plugin stucks on connect dialog and i Have to close plugin or total commander in app managment. I tried to run other multiple commands (for example FEAT;STAT) but the result is same. Ftp plugin stucks on connect dialog and I have to close ftp plugin or total commander through app managment. Maybe I do something wrong with running multiple commands? And a ; separator must be used another way.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You are right, there is a problem with sending multiple commands - I will check it.
Author of Total Commander
https://www.ghisler.com
Post Reply