Comment 13 for bug 335362

Revision history for this message
methane (songofacandy) wrote : Re: UnicodeDecodeError when processing paths that have the character รค

bzrlib.commands.main() decodes sys.argv like:
        user_encoding = osutils.get_user_encoding()
        argv = [a.decode(user_encoding) for a in argv[1:]]

This patch follows the way.

But, Windows locale encoding is not support all of unicode chars.
To support Unicode filenames, I can think following ways.
 1. Use Py3k ;-)
 2. Use ctypes.GetCommandLineW()
 3. Use urlencode for filenames. ( file:///D:/%uXXXX...)
 4. pass filenames with stdin instead of commandline arguments.