But I have a problem:
I'm trying to show the musicbrainz tag's another program has written to an mp3, but there is a problem with the encoding. The TXXX frame is in Unicode, the description is read correctly, but the value wil only read hard-coded as ISO88591. In my opinion, it makes sense that the value is read from the text frame in the specified encoding.
Here's the code fragment:
TXXXFrames.cs:
...
public override void Read(TagReadingInfo tagReadingInfo, Stream stream)
{
_frameHeader.Read(tagReadingInfo, ref stream);
if (_frameHeader.FrameSizeExcludingAdditions > 0)
{
TextEncoding = (EncodingType)stream.Read1();
int bytesLeft = _frameHeader.FrameSizeExcludingAdditions - 1;
Description = ID3v2Utils.ReadString(TextEncoding, stream, ref bytesLeft);
//Bugfix 2012-04-08 alte Made, was: Value = ID3v2Utils.ReadString(EncodingType.ISO88591, stream, bytesLeft);
Value = ID3v2Utils.ReadString(TextEncoding, stream, bytesLeft);
}
else
...
Hi Jud, very good tagging framework!
But I have a problem: I'm trying to show the musicbrainz tag's another program has written to an mp3, but there is a problem with the encoding. The TXXX frame is in Unicode, the description is read correctly, but the value wil only read hard-coded as ISO88591. In my opinion, it makes sense that the value is read from the text frame in the specified encoding.
Here's the code fragment: TXXXFrames.cs: ... public override void Read(TagReadingInfo tagReadingInfo, Stream stream) { _frameHeader.Read(tagReadingInfo, ref stream); if (_frameHeader.FrameSizeExcludingAdditions > 0) { TextEncoding = (EncodingType)stream.Read1(); int bytesLeft = _frameHeader.FrameSizeExcludingAdditions - 1; Description = ID3v2Utils.ReadString(TextEncoding, stream, ref bytesLeft);
//Bugfix 2012-04-08 alte Made, was: Value = ID3v2Utils.ReadString(EncodingType.ISO88591, stream, bytesLeft); Value = ID3v2Utils.ReadString(TextEncoding, stream, bytesLeft); } else ...