From 5de428df07c571322cfbc055a780d41f0ce95a67 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Tue, 21 Jun 2022 22:13:10 +0200 Subject: Change encoding to latin-1 for libghdl (to comply with standard). It can be monkey-patched via pyGHDL.libGHDL.ENCODING. (cherry picked from commit 2dd38de9d52493cde7c045ed73a987ed06bf617a) --- pyGHDL/libghdl/str_table.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pyGHDL/libghdl/str_table.py') diff --git a/pyGHDL/libghdl/str_table.py b/pyGHDL/libghdl/str_table.py index a91268bb4..3f55d1eb3 100644 --- a/pyGHDL/libghdl/str_table.py +++ b/pyGHDL/libghdl/str_table.py @@ -36,6 +36,7 @@ from ctypes import c_char_p from pyTooling.Decorators import export +from pyGHDL.libghdl import ENCODING from pyGHDL.libghdl._types import String8Id from pyGHDL.libghdl._decorator import BindToLibGHDL @@ -57,4 +58,4 @@ def Get_String8_Ptr(Id: String8Id, Length: int) -> str: :param Id: String8Id for the string to query. :return: String8 as string. """ - return _String8_Address(Id)[:Length].decode("utf-8") + return _String8_Address(Id)[:Length].decode(ENCODING) -- cgit v1.2.3