@@ -1229,7 +1229,7 @@ def search_dict(file_path, excludes, return_line=False,
12291229 log = lambda x : None
12301230
12311231 try :
1232- file_handle = open (file_path , "r" )
1232+ file_handle = open (file_path , "r" , encoding = "UTF-8" )
12331233 except EnvironmentError as e :
12341234 if e .errno != errno .ENOENT :
12351235 raise
@@ -1364,7 +1364,7 @@ def store(self, mfst_path):
13641364 e .filename )
13651365 raise
13661366
1367- mfile = os .fdopen (fd , "w" )
1367+ mfile = os .fdopen (fd , "w" , encoding = "UTF-8" )
13681368
13691369 #
13701370 # We specifically avoid sorting manifests before writing
@@ -1668,7 +1668,7 @@ def __storebytype(self):
16681668 except EnvironmentError as e :
16691669 raise apx ._convert_error (e )
16701670
1671- f = os .fdopen (fd , "w" )
1671+ f = os .fdopen (fd , "w" , encoding = "UTF-8" )
16721672 try :
16731673 for a in acts :
16741674 f .write ("{0}\n " .format (a ))
@@ -1695,7 +1695,7 @@ def create_cache(name, refs):
16951695 try :
16961696 fd , fn = tempfile .mkstemp (dir = t_dir ,
16971697 prefix = name + "." )
1698- with os .fdopen (fd , "w" ) as f :
1698+ with os .fdopen (fd , "w" , encoding = "UTF-8" ) as f :
16991699 f .writelines (refs ())
17001700 os .chmod (fn , PKG_FILE_MODE )
17011701 portable .rename (fn , self .__cache_path (name ))
@@ -1745,7 +1745,7 @@ def __load_cached_data(self, name):
17451745 if os .path .exists (mpath ):
17461746 # we have cached copy on disk; use it
17471747 try :
1748- with open (mpath , "r" ) as f :
1748+ with open (mpath , "r" , encoding = "UTF-8" ) as f :
17491749 self ._cache [name ] = [
17501750 a for a in
17511751 (
@@ -1830,7 +1830,7 @@ def gen_actions_by_type(self, atype, attr_match=None, excludes=EmptyI):
18301830 attr_match = _compile_fnpats (attr_match )
18311831
18321832 try :
1833- with open (mpath , "r" ) as f :
1833+ with open (mpath , "r" , encoding = "UTF-8" ) as f :
18341834 for l in f :
18351835 a = actions .fromstr (l .rstrip ())
18361836 if (excludes and
@@ -1889,7 +1889,7 @@ def __load_attributes(self):
18891889 mpath = self .__cache_path ("manifest.set" )
18901890 if not os .path .exists (mpath ):
18911891 return False
1892- with open (mpath , "r" ) as f :
1892+ with open (mpath , "r" , encoding = "UTF-8" ) as f :
18931893 for l in f :
18941894 a = actions .fromstr (l .rstrip ())
18951895 if not self .excludes or \
0 commit comments