clearbluejar / ghidriff

Python Command-Line Ghidra Binary Diffing Engine
https://clearbluejar.github.io/ghidriff/
GNU General Public License v3.0
507 stars 21 forks source link

specify md output encoding as utf-8 #90

Closed L4ys closed 5 months ago

L4ys commented 5 months ago

Specify md output encoding as utf-8 to prevent some encoding errors on non-English language systems

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\test\scoop\apps\python311\current\Scripts\ghidriff.exe\__main__.py", line 7, in <module>
  File "C:\Users\test\scoop\apps\python311\current\Lib\site-packages\ghidriff\__main__.py", line 94, in main
    d.dump_pdiff_to_path(diff_name,
  File "C:\Users\test\scoop\apps\python311\current\Lib\site-packages\ghidriff\ghidra_diff_engine.py", line 1716, in dump_pdiff_to_path
    f.write(diff_text)
UnicodeEncodeError: 'cp950' codec can't encode character '\xa9' in position 8649: illegal multibyte sequence
clearbluejar commented 5 months ago

good catch! I want to see if any other of the writes need the update as well. will check back in here soon.

clearbluejar commented 5 months ago

added encoding to two other writes. should be good.