summaryrefslogtreecommitdiffstats
path: root/SCons/Tool/JavaCommon.py
diff options
context:
space:
mode:
Diffstat (limited to 'SCons/Tool/JavaCommon.py')
-rw-r--r--SCons/Tool/JavaCommon.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/SCons/Tool/JavaCommon.py b/SCons/Tool/JavaCommon.py
index 31695c2..c7e62b8 100644
--- a/SCons/Tool/JavaCommon.py
+++ b/SCons/Tool/JavaCommon.py
@@ -29,6 +29,8 @@ import glob
from pathlib import Path
from typing import List
+import SCons.Util
+
java_parsing = True
default_java_version = '1.4'
@@ -451,8 +453,8 @@ if java_parsing:
def parse_java_file(fn, version=default_java_version):
- with open(fn, encoding='utf-8') as f:
- data = f.read()
+ with open(fn, "rb") as f:
+ data = SCons.Util.to_Text(f.read())
return parse_java(data, version)