Skip to content

Fix composer names with accented characters showing as "Unknown"#4

Open
eeksock wants to merge 1 commit into
serkantanriverdi:mainfrom
eeksock:fix-composer-name-encoding
Open

Fix composer names with accented characters showing as "Unknown"#4
eeksock wants to merge 1 commit into
serkantanriverdi:mainfrom
eeksock:fix-composer-name-encoding

Conversation

@eeksock

@eeksock eeksock commented Jul 19, 2026

Copy link
Copy Markdown

Accented characters, like Chris Hülsbeck, weren't displaying properly in the Now Playing bar and the control center, and showed up as "Unknown" instead.

SID header text fields (title/author) are nominally ASCII, but decades of HVSC files use Latin-1 for accented composer names - e.g. Chris Hulsbeck's author field is literally "Chris H" + 0xFC + "lsbeck", where 0xFC is the Latin-1 byte for u-umlaut. stringWithUTF8String: (used for the Now Playing bar and Control Center) returns nil for the whole string when it hits a byte that isn't valid UTF-8, which is exactly what a lone Latin-1 high-bit byte is - so the author fell back to "Unknown" even though the track list already showed the name correctly via a separate, more lenient code path.

This decodes SID header text by trying UTF-8 first and falling back to Latin-1 if that fails, and shares this logic across all three places that read title/author bytes (playSIDFile, authorFromFile, and the table view's cell renderer, which had its own inline duplicate of authorFromFile that was never actually calling it).

SID header text fields (title/author) are nominally ASCII, but decades
of HVSC files use Latin-1 for accented composer names - e.g. Chris
Hulsbeck's author field is literally "Chris H" + 0xFC + "lsbeck",
where 0xFC is the Latin-1 byte for u-umlaut.

stringWithUTF8String: (used for the Now Playing bar and Control
Center) returns nil for the whole string when it hits a byte that
isn't valid UTF-8, which is exactly what a lone Latin-1 high-bit byte
is - so the author fell back to "Unknown" even though the track list
already showed the name correctly via a separate, more lenient code
path.

Decode SID header text by trying UTF-8 first and falling back to
Latin-1 if that fails, and share this logic across all three places
that read title/author bytes (playSIDFile, authorFromFile, and the
table view's cell renderer, which had its own inline duplicate of
authorFromFile that was never actually calling it).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant