login about faq

I'm trying SFTP Read Directory Listing(Python) of your example code.
http://www.example-code.com/python/sftp_readDir.asp
Here's the error message.

Traceback (most recent call last):
  File "C:/Users/chilkat/workspace/PythonTest/test.py", line 103, in <module>
    print(fileObj.filename())
  File "C:/Python33/lib/site-packages/chilkat.py", line 5601, in filename
46 files~!!
    def filename(self): return _chilkat.CkSFtpFile_filename(self)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 0: invalid start byte
I'm using python33 and eclipse on MS Windows. Please let me know how to fix this problem.

asked Feb 27 '14 at 10:11

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Feb 27 '14 at 10:12


The "Utf8" property can be set to True to indicate that Chilkat should return utf-8 strings, and also interpret input string arguments as utf-8. (When Utf8 is False, which is the default, then ANSI strings are expected and returned by the Chilkat API.)

For example:

# indicate that input/output strings should be utf-8
sftp.put_Utf8(True)

link

answered Feb 27 '14 at 10:15

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Feb 27 '14 at 10:15

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×18
×1

Asked: Feb 27 '14 at 10:11

Seen: 4,919 times

Last updated: Feb 27 '14 at 10:15

powered by OSQA