Skip to content

Commit 1b3c2e7

Browse files
committed
Merge 'Replace non-ASCII characters in song names with question marks' (#2222)
2 parents 28e600c + d867093 commit 1b3c2e7

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Cosmetics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,9 +989,9 @@ def patch_song_names(rom: Rom, settings: Settings, log: CosmeticsLog, symbols: d
989989
break
990990
if len(song_name) > 50:
991991
song_name_cropped = song_name[:50]
992-
text_bytes = [ord(c) for c in song_name_cropped]
992+
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name_cropped]
993993
else:
994-
text_bytes = [ord(c) for c in song_name] + [ord('\0')] * (50 - len(song_name))
994+
text_bytes = [ord('?' if ord(c) >= 0x80 else c) for c in song_name] + [ord('\0')] * (50 - len(song_name))
995995
bytes_to_write += text_bytes
996996
rom.write_bytes(symbols['CFG_SONG_NAMES'], bytes_to_write)
997997
log.display_custom_song_names = settings.display_custom_song_names

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '8.1.57'
1+
__version__ = '8.1.58'
22

33
# This is a supplemental version number for branches based off of main dev.
44
supplementary_version = 0

0 commit comments

Comments
 (0)