aboutsummaryrefslogtreecommitdiffstats
path: root/pyGHDL/dom
diff options
context:
space:
mode:
Diffstat (limited to 'pyGHDL/dom')
-rw-r--r--pyGHDL/dom/NonStandard.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyGHDL/dom/NonStandard.py b/pyGHDL/dom/NonStandard.py
index 14f5e1eac..1dbef9a9a 100644
--- a/pyGHDL/dom/NonStandard.py
+++ b/pyGHDL/dom/NonStandard.py
@@ -59,7 +59,7 @@ from pyGHDL.libghdl import (
errorout_memory,
LibGHDLException,
utils,
- files_map_editor,
+ files_map_editor, ENCODING,
)
from pyGHDL.libghdl.flags import Flag_Gather_Comments
from pyGHDL.libghdl.vhdl import nodes, sem_lib
@@ -155,11 +155,11 @@ class Document(VHDLModel_Document):
self.__domTranslateTime = time.perf_counter() - t1
def __loadFromPath(self):
- with self._filename.open("r", encoding="utf-8") as file:
+ with self._filename.open("r", encoding=ENCODING) as file:
self.__loadFromString(file.read())
def __loadFromString(self, sourceCode: str):
- sourcesBytes = sourceCode.encode("utf-8")
+ sourcesBytes = sourceCode.encode(ENCODING)
sourceLength = len(sourcesBytes)
bufferLength = sourceLength + 128
self.__ghdlFileID = name_table.Get_Identifier(str(self._filename))