Audio::TagLib::ID3v2::CommentsFrame - An implementation of ID3v2 comments


  use Audio::TagLib::ID3v2::CommentsFrame;
  my $i = Audio::TagLib::ID3v2::CommentsFrame->new("Latin1");
  $i->setText(Audio::TagLib::String->new("blah blah blah"));


This implements the ID3v2 comment format. An ID3v2 comment concists of a language encoding, a description and a single text field.

new(PV $encoding = "Latin1")

Construct an empty comment frame that will use the text encoding $encoding.

new(ByteVector $data)

Construct a comment based on the data in $data.


Destroys this CommentFrame instance.

String toString()

Returns the text of this comment.

see text()

ByteVector language()

Returns the language encoding as a 3 byte encoding as specified by ISO-639-2

NOTE Most taggers simply ignore this value.

see setLanguage()

String description()

Returns the description of this comment.

NOTE Most taggers simply ignore this value.

see setDescription()

String text()

Returns the text of this comment.

see setText()

void setLanguage(ByteVector $languageCode)

Set the language using the 3 byte language code from ISO-639-2 to $languageCode.

see language()

void setDescripton(String $s)

Sets the description of the comment to $s.

see description()

void setText(String $s)

Sets the text portion of the comment to $s.

see text()

PV textEncoding()

Returns the text encoding that will be used in rendering this frame. This defaults to the type that was either specified in the constructor or read from the frame when parsed.

see setTextEncoding()

see render()

void setTextEncoding(PV $encoding)

Sets the text encoding to be used when rendering this frame to $encoding.

see textEncoding()

see render()


None by default.


Audio::TagLib Frame


Dongxu Ma, <>


Copyright (C) 2005 by Dongxu Ma

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.