Fix text encoding to cp437 which Atari ST's charset is based upon.

Also add dependency on Python script to make rule.
This commit is contained in:
Philip Zembrod 2020-06-27 23:48:02 +02:00
parent ae1f4d9dff
commit 1a7141557f
2 changed files with 2 additions and 2 deletions

View File

@ -7,5 +7,5 @@ fth: $(fth_files)
# Generic rule for converting .fb blk sources into .fth files.
%.fth: %.fb
%.fth: %.fb fb2fth.py
./fb2fth.py $< $@

View File

@ -14,7 +14,7 @@ def readToString(inFile):
offset = 0
while(offset < len(block)):
# sys.stderr.write("block %d offset %d\n" % (blockNo, offset))
line = block[offset:offset+64].decode(encoding="latin_1")
line = block[offset:offset+64].decode(encoding="cp437")
result.append(line.rstrip())
offset += 64
blockNo += 1