effigies / BitTornado

UNMAINTAINED - John Hoffman's fork of the original bittorrent
Other
150 stars 44 forks source link

how can the btmakemetafile.py support filename include Chinese ? #42

Closed yang502 closed 8 years ago

yang502 commented 8 years ago

I am using the branch on Python2.7 .

BitTornado/btmakemetafile.py http:172.21.108.66:6969/announce /opt/yang/iso/win7高中模板.base

error: bad filename: win7高中模板.base run with no args for parameter explanations How can the makebt file can support filename include Chinese?

effigies commented 8 years ago

It should support unicode filenames. I can try to fix this, though for the most part I'm not working on 2.7 anymore. Can you open a Python shell and give the output of:

import sys
print sys.getfilesystemencoding()
effigies commented 8 years ago

Can you check out the encoding_fix branch? If that doesn't fix it, it should at least get us closer to understanding the problem.

WuYiP commented 8 years ago

Thank you ,effigies,I was also confused about the problem before.Now,because of you ,I can solve it .

yang502 commented 8 years ago

in the python(2.7) prompt ,the unicode is UTF-8. I haved tried the encoding_fix ,it has works well with filename include Chinese. Hope it will also works in python2.7 branch master branch ! Thanks!

effigies commented 8 years ago

Great! Glad to hear it got fixed. Merged, so the python2.7 should be working for you.