From: Zac Medico Date: Thu, 12 Jan 2012 01:34:49 +0000 (-0800) Subject: read_corresponding_eapi_file: unicode, bug 398587 X-Git-Tag: v2.2.0_alpha85~38 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=31b4d0cb3a183e29fe0d745187470ded37ffd433;p=portage.git read_corresponding_eapi_file: unicode, bug 398587 --- diff --git a/pym/portage/util/__init__.py b/pym/portage/util/__init__.py index 58501dca6..13aa721ac 100644 --- a/pym/portage/util/__init__.py +++ b/pym/portage/util/__init__.py @@ -388,7 +388,9 @@ def read_corresponding_eapi_file(filename): default = "0" eapi_file = os.path.join(os.path.dirname(filename), "eapi") try: - f = open(eapi_file, "r") + f = io.open(_unicode_encode(eapi_file, + encoding=_encodings['fs'], errors='strict'), + mode='r', encoding=_encodings['repo.content'], errors='replace') lines = f.readlines() if len(lines) == 1: eapi = lines[0].rstrip("\n")