From 36a6dd69fcd286f5146adbe200e5c0c5a93cb5d2 Mon Sep 17 00:00:00 2001 From: Rob McMullen Date: Tue, 11 Jul 2017 16:13:54 -0700 Subject: [PATCH] dos33: workaround to ignore non-ascii characters. fails on beagle bros 'Alpha Plot.dsk' --- atrcopy/dos33.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atrcopy/dos33.py b/atrcopy/dos33.py index 36e2838..a7713d0 100644 --- a/atrcopy/dos33.py +++ b/atrcopy/dos33.py @@ -180,7 +180,7 @@ class Dos33Dirent(Dirent): self.parse_raw_dirent(image, bytes) def __str__(self): - return "File #%-2d (%s) %03d %-30s %03d %03d" % (self.file_num, self.summary, self.num_sectors, self.filename.decode("utf-8"), self.track, self.sector) + return "File #%-2d (%s) %03d %-30s %03d %03d" % (self.file_num, self.summary, self.num_sectors, self.filename.decode("ascii", errors='ignore'), self.track, self.sector) def __eq__(self, other): return self.__class__ == other.__class__ and self.filename == other.filename and self.track == other.track and self.sector == other.sector and self.num_sectors == other.num_sectors