vgm: convert metadata strings from UCS-2 to UTF-8#145
Open
drfiemost wants to merge 2 commits intolibgme:masterfrom
Open
vgm: convert metadata strings from UCS-2 to UTF-8#145drfiemost wants to merge 2 commits intolibgme:masterfrom
drfiemost wants to merge 2 commits intolibgme:masterfrom
Conversation
e05239b to
dc7ea6f
Compare
Contributor
Author
Updated to use one of the reserved vars from |
for vgm we convert from UCS-2 to UTF-8, for SAP data is a subset of ASCII so UTF-8 compatible, NSFe should use UTF-8, all the others are some unspecified ANSI codepage
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In VGM files the metadata strings are encoded as UCS-2.
Currently only the low byte is considered and if the high byte is not zero the character is simply replaced by a question mark, causing loss of information.
This patch converts the strings from UCS-2 to UTF-8 preserving the metadata.
The downside is that other formats provide the track info in ANSI or ASCII, thus causing an inconsistent interface.
One possible solution is to add a flag to the
track_info_tstruct that specifies if metadata is in UTF-8 or ANSI format.Otherwise the applications could rely on the file extension but that would be quite ugly.