From d90a600b88d04d13875063843b6400c88343e94d Mon Sep 17 00:00:00 2001 From: Egor Kin Date: Mon, 25 May 2020 13:38:59 +0300 Subject: [PATCH] Fix export unicode comments Current script make 1 character for each byte in comment line. So it`s cause double length and incorrect chars in international comments from IDA in Ghidra. This small patch fix it. --- GhidraBuild/IDAPro/Python/7xx/python/idaxml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GhidraBuild/IDAPro/Python/7xx/python/idaxml.py b/GhidraBuild/IDAPro/Python/7xx/python/idaxml.py index 51fc8eba99..3bd77cc691 100644 --- a/GhidraBuild/IDAPro/Python/7xx/python/idaxml.py +++ b/GhidraBuild/IDAPro/Python/7xx/python/idaxml.py @@ -632,7 +632,7 @@ class XmlExporter(IdaXml): # tag_remove seems to be losing last character # work around is to add a space cmt_text = ida_lines.tag_remove(cmt + ' ') - self.write_text(cmt_text) + self.write_text(cmt_text.decode('utf-8')) self.end_element(COMMENT, False)