Skip to content

Commit 070cd63

Browse files
committed
possible fix for issue #138 Crash when codepage is set to sp65001
1 parent 4298390 commit 070cd63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pcbasic/disk.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838

3939
ENCODING = locale.getpreferredencoding()
4040

41+
# workaround for LookupError
42+
if ENCODING == 'cp65001':
43+
ENCODING = 'utf-8'
44+
4145

4246
# GW-BASIC FILE CONTROL BLOCK structure:
4347
# source: IBM Basic reference 1982 (for BASIC-C, BASIC-D, BASIC-A) appendix I-5

0 commit comments

Comments
 (0)