Thanks to this site and several others, I created a simple code for reading ID3v2.3 tags from MP3 files. This was a great learning experience, as I previously did not know about hex / byte, etc.
I can successfully read the data, but I ran into a problem that I believe is related to the encoding used. I realized that text frames have a byte at the beginning of the “text” that describes the encoding used, and potentially more information in the next two bytes ...
Example: Data from a TIT2 frame begins with byte $ 03 (hex) before the actual text. This text is displayed correctly, albeit with an extra character at the beginning, using Encoding.ASCII.GetString
In another MP3, data from TIT2 starts at $ 01, followed by $ FF $ FE, which I believe is related to Unicode? The text itself is broken, although there is $ 00 between each text character, and this stops the data from being displayed in windows (as soon as 00 is encountered, the text just stops, so I get the first character and that it is). I tried using Encoding.UNICODE.GetString, but that seems to return gibberish.
It seems that printing this data on the console works with spaces between each char, so reading the data works correctly.
I read the official documentation for ID3v2.3, but I think I'm just not good enough to understand the text encoding section.
Any answers or links to articles that may be helpful would be greatly appreciated!
Relations Ross
source
share