login about faq

I seem to be having a problem with downloading Japanese file names. These are supposed to be UTF-8 but I have also tried [Shift_JIS EUC-JP EUC-CN] with the same result (put_DirListingCharset).

From the lastErrorXml it looks like the Japenese part of the file is gone?

asked Apr 21 '14 at 12:21

chilkat's gravatar image

chilkat ♦♦

The DirListingCharset property tells Chilkat how to interpret the bytes of a directory listing.

What you want instead is to set the CommandCharset property -- to tell the FTP server how to interpret the bytes in the commands sent over the control connection.

In addition, you'll need to ensure that for the string passed to a Chilkat method, that the bytes are correctly interpreted. If the Ruby string is utf-8, make sure to set the "Utf8" property of the Chilkat FTP2 object. For example:


Remember: In Ruby, a String object holds and manipulates an arbitrary sequence of bytes, typically representing characters. Chilkat however, must know how to interpret the bytes, and therefore needs to know if you are passing bytes representing characters using the ANSI encoding (whatever that may be for the local machine, which may be Shift-JIS for Japanese computers), or utf-8.

In summary:

Step 1 is to make sure the string is passed to Chilkat so that Chilkat correctly interprets the bytes.

Step 2 is to make sure the string is passed to the FTP server using the character encoding expected by the FTP server, so that it can correctly interpret the bytes. This is done by setting the CommandCharset property.


answered Apr 21 '14 at 12:31

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Apr 21 '14 at 12:21

Seen: 2,458 times

Last updated: Apr 21 '14 at 12:31

powered by OSQA