Closed deanishe closed 6 years ago
Done in 7e43476:
// DefaultEncoding returns default encoding of tag.
// Default encoding is used in methods (e.g. SetArtist, SetAlbum ...) for
// setting text frames without the explicit providing of encoding.
func (tag *Tag) DefaultEncoding() Encoding {
return tag.defaultEncoding
}
// SetDefaultEncoding sets default encoding for tag.
// Default encoding is used in methods (e.g. SetArtist, SetAlbum ...) for
// setting text frames without explicit providing encoding.
func (tag *Tag) SetDefaultEncoding(encoding Encoding) {
tag.defaultEncoding = encoding
}
Perhaps I've missed something here. Adding my own
TextFrame
s toTag
s seems to be more complicated than it need be, asTag
doesn't export its default encoding.The
Tag.Set*
convenience methods useTextFrame{Encoding: tag.defaultEncoding ...}
.Because
Tag.defaultEncoding
isn't exported, you need to re-implementTag.setDefaultEncoding()
to add your ownTextFrame
.(I'm assuming I shouldn't just smush UTF-8
TextFrame
s into aTag
whose version is < 4.)