[tahoe-dev] [tahoe-lafs] #534: "tahoe cp" command encoding issue
tahoe-lafs
trac at allmydata.org
Mon Feb 23 17:09:43 PST 2009
#534: "tahoe cp" command encoding issue
-----------------------------------+----------------------------------------
Reporter: francois | Owner:
Type: defect | Status: reopened
Priority: minor | Milestone: undecided
Component: code-frontend-cli | Version: 1.2.0
Resolution: | Keywords: cp encoding
Launchpad_bug: |
-----------------------------------+----------------------------------------
Comment(by francois):
Ok, the latest patch bundle (unicode.dpatch) will hopefully fix all those
unicode issues (including #629) in a much cleaner way.
All encoding conversion code is now located in stringutils.py. It provides
a single location where we might be able to use better encoding detection
methods such as those discussed on the mailing-list.
Methods currently in used are:
* for command line arguments (sys.argv)
* convert from UTF-8 to unicode
* if it fails, returns an UsageError
* for text display (sys.stdout)
* convert from unicode to sys.stdout.encoding and replace non-
representable characters by '?'
* for filename encoding on the filesystem (os.listdir(), open())
* convert between sys.getfilesystemencoding() and unicode
* if it fails, returns an UsageError
Many precondition checks have been added to ensure that filenames are
treated as unicode objects.
--
Ticket URL: <http://allmydata.org/trac/tahoe/ticket/534#comment:41>
tahoe-lafs <http://allmydata.org>
secure decentralized file storage grid
More information about the tahoe-dev
mailing list