Skip to content

Commit 356ed76

Browse files
authored
Merge pull request #1495 from johnhaddon/configEncodingFix
ConfigLoader : Specify encoding in calls to `open()`
2 parents 08cdbdb + 51d6e71 commit 356ed76

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
10.6.x.x (relative to 10.6.0.2)
22
========
33

4+
Fixes
5+
-----
46

7+
- ConfigLoader : Fixed UnicodeDecodeErrors in non-UTF8 locales.
58

69
10.6.0.2 (relative to 10.6.0.1)
710
========

python/IECore/ConfigLoader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def loadConfig( searchPaths, contextDict = {}, raiseExceptions = False, subdirec
7272
fileContextDict["__file__"] = fullFileName
7373

7474
try :
75-
with open( fullFileName ) as f :
75+
with open( fullFileName, encoding = "utf-8" ) as f :
7676
exec(
7777
compile( f.read(), fullFileName, "exec" ),
7878
fileContextDict, fileContextDict

0 commit comments

Comments
 (0)