forked from whipper-team/whipper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch replaces the previous broken approach to TOC string decoding that used `.encode().decode('unicode_escape')` with proper parsing of the escape sequences cdrdao is known to generate. The new parser is also lenient with invalid escape sequences, that can occur due to improper escaping in cdrdao. See: cdrdao/cdrdao#32 Latin-1: This new parsing method should work for Latin-1 strings for both old and new versions of cdrdao, as long as those strings don't trigger the improper escaping issues in upstream cdrdao. This has been verified with the album Diorama from the Danish black metal band MØL. MS-JIS: This new parsing method should also work for MS-JIS strings as long as the .toc file was generated by cdrdao 1.2.5+ and the strings don't trigger improper escaping issues in upstream cdrdao. Unfortunately, I don't have any CD with CD-Text in MS-JIS, so I could not verify this. cdrdao versions before 1.2.5 will still cause whipper to produce mojibake (garbled characters) when reading MS-JIS CD-Text, as those versions do not encode strings in UTF-8. Other encodings: As far as I know, CD-Text only supports officially ASCII, Latin-1 and MS-JIS, but I wouldn't be surprised if there are unofficial encodings out there, given the strange strings I've seen in some bug reports. If you have a CD with garbled CD-Text, please submit a bug report indicating the performer, album name, language and attach the .toc file so that the produced strings can be compared to the expected text. Fixes whipper-team#169 Fixes whipper-team#183 Signed-off-by: Alicia Boya García <[email protected]>
- Loading branch information
Showing
7 changed files
with
472 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
REM DISCID 700AC908 | ||
REM COMMENT "whipper 0.10.1.dev27+ga4b9742.d20240827" | ||
PERFORMER "MØL" | ||
TITLE "Diorama" | ||
FILE "data.wav" WAVE | ||
TRACK 01 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Fraktur" | ||
ISRC DED832100085 | ||
INDEX 01 00:00:00 | ||
TRACK 02 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Photophobic" | ||
ISRC DED832100086 | ||
INDEX 01 04:19:00 | ||
TRACK 03 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Serf" | ||
ISRC DED832100087 | ||
INDEX 01 09:37:00 | ||
TRACK 04 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Vestige" | ||
ISRC DED832100088 | ||
INDEX 01 14:59:12 | ||
TRACK 05 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Redacted" | ||
ISRC DED832100089 | ||
INDEX 01 20:37:68 | ||
TRACK 06 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Itinerari" | ||
ISRC DED832100090 | ||
INDEX 01 25:54:18 | ||
TRACK 07 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Tvesind" | ||
ISRC DED832100091 | ||
INDEX 01 30:57:58 | ||
TRACK 08 AUDIO | ||
PERFORMER "MØL" | ||
TITLE "Diorama" | ||
ISRC DED832100092 | ||
INDEX 01 38:46:57 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
CD_DA | ||
|
||
CD_TEXT { | ||
LANGUAGE_MAP { | ||
0: 9 | ||
} | ||
LANGUAGE 0 { | ||
TITLE "Diorama" | ||
PERFORMER "M\330L" | ||
SIZE_INFO { 0, 1, 8, 0, 7, 3, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 3, 12, 0, 0, 0, | ||
0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0} | ||
} | ||
} | ||
|
||
// Track 1 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100085" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Fraktur" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 0 04:19:00 | ||
|
||
|
||
// Track 2 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100086" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Photophobic" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 04:19:00 05:18:00 | ||
|
||
|
||
// Track 3 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100087" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Serf" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 09:37:00 05:22:12 | ||
|
||
|
||
// Track 4 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100088" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Vestige" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 14:59:12 05:38:56 | ||
|
||
|
||
// Track 5 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100089" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Redacted" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 20:37:68 05:16:25 | ||
|
||
|
||
// Track 6 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100090" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Itinerari" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 25:54:18 05:03:40 | ||
|
||
|
||
// Track 7 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100091" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Tvesind" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 30:57:58 07:48:74 | ||
|
||
|
||
// Track 10 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100092" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Diorama" | ||
PERFORMER "M\330L" | ||
} | ||
} | ||
FILE "data.wav" 38:46:57 07:14:36 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
CD_DA | ||
|
||
CD_TEXT { | ||
LANGUAGE_MAP { | ||
0: 9 | ||
} | ||
LANGUAGE 0 { | ||
TITLE "Diorama" | ||
PERFORMER "MØL" | ||
SIZE_INFO { 0, 1, 8, 0, 7, 3, 0, 0, 0, 0, 0, 0, | ||
0, 0, 0, 0, 0, 0, 0, 3, 12, 0, 0, 0, | ||
0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0} | ||
} | ||
} | ||
|
||
// Track 1 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100085" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Fraktur" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 0 04:19:00 | ||
|
||
|
||
// Track 2 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100086" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Photophobic" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 04:19:00 05:18:00 | ||
|
||
|
||
// Track 3 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100087" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Serf" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 09:37:00 05:22:12 | ||
|
||
|
||
// Track 4 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100088" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Vestige" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 14:59:12 05:38:56 | ||
|
||
|
||
// Track 5 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100089" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Redacted" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 20:37:68 05:16:25 | ||
|
||
|
||
// Track 6 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100090" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Itinerari" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 25:54:18 05:03:40 | ||
|
||
|
||
// Track 7 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100091" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Tvesind" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 30:57:58 07:48:74 | ||
|
||
|
||
// Track 8 | ||
TRACK AUDIO | ||
NO COPY | ||
NO PRE_EMPHASIS | ||
TWO_CHANNEL_AUDIO | ||
ISRC "DED832100092" | ||
CD_TEXT { | ||
LANGUAGE 0 { | ||
TITLE "Diorama" | ||
PERFORMER "MØL" | ||
} | ||
} | ||
FILE "data.wav" 38:46:57 07:14:36 | ||
|
Oops, something went wrong.