aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/rtlil/rtlil_backend.cc2
-rw-r--r--backends/smt2/smtio.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/backends/rtlil/rtlil_backend.cc b/backends/rtlil/rtlil_backend.cc
index 1b11de5ec..b5163aefe 100644
--- a/backends/rtlil/rtlil_backend.cc
+++ b/backends/rtlil/rtlil_backend.cc
@@ -75,7 +75,7 @@ void RTLIL_BACKEND::dump_const(std::ostream &f, const RTLIL::Const &data, int wi
else if (str[i] == '\t')
f << stringf("\\t");
else if (str[i] < 32)
- f << stringf("\\%03o", str[i]);
+ f << stringf("\\%03o", (unsigned char)str[i]);
else if (str[i] == '"')
f << stringf("\\\"");
else if (str[i] == '\\')
diff --git a/backends/smt2/smtio.py b/backends/smt2/smtio.py
index 91efc13a3..3ba43825c 100644
--- a/backends/smt2/smtio.py
+++ b/backends/smt2/smtio.py
@@ -337,7 +337,7 @@ class SmtIo:
def p_thread_main(self):
while True:
- data = self.p.stdout.readline().decode("ascii")
+ data = self.p.stdout.readline().decode("utf-8")
if data == "": break
self.p_queue.put(data)
self.p_queue.put("")
@@ -359,7 +359,7 @@ class SmtIo:
def p_write(self, data, flush):
assert self.p is not None
- self.p.stdin.write(bytes(data, "ascii"))
+ self.p.stdin.write(bytes(data, "utf-8"))
if flush: self.p.stdin.flush()
def p_read(self):