From: Zac Medico Date: Tue, 4 Aug 2009 19:27:24 +0000 (-0000) Subject: Bug #280269 - Decode commandline arguments to unicode when necessary. X-Git-Tag: v2.2_rc36~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5013be0b2b4d6cdf530d1f324ad8e74b112b2544;p=portage.git Bug #280269 - Decode commandline arguments to unicode when necessary. svn path=/main/trunk/; revision=13904 --- diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py index 34b6ef1c5..0d14107cb 100644 --- a/pym/_emerge/main.py +++ b/pym/_emerge/main.py @@ -747,6 +747,10 @@ def parse_opts(tmpcmdline, silent=False): if myaction is None and myoptions.deselect is True: myaction = 'deselect' + if myargs and not isinstance(myargs[0], unicode): + for i in xrange(len(myargs)): + myargs[i] = unicode(myargs[i], encoding='utf_8', errors='replace') + myfiles += myargs return myaction, myopts, myfiles