|
From: | Radim Tobolka |
Subject: | [Duplicity-talk] unicode support strategy |
Date: | Sun, 30 Sep 2018 20:11:58 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Hi,going through the code, I see you've decided not to perform byte/unicode conversion on I/O boundaries, but rather work with byte filenames and convert to unicode when needed. Is absence of surrogateescape codec error handler in py2 sole reason for this?
I believe there is way to implement fsencode/fsdecode with surrogateescape behavior even in py2, see attachment.
I believe, it is now possible to convert from bytes as soon as possible and work internally with unicode. In my opinion, this leads to tight and elegant patch, that will work well both in py2 and 3. I even have stitched something along those lines already. I'd love to complete it, provided you find this approach acceptable.
Have a great day, Radim.
sedemo.py
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |