Newbie C question #2, TagLib, Firefox & Unicode

Jim jmartin92 at
Sun Feb 6 20:58:41 CET 2011

On 2/6/2011 2:31 PM, Jeremy Gregorio wrote:
> Hi again :). So I can now tag MP3s from my plugin, youtubemp3podcaster
> ( But I'm
> struggling with Unicode. I wrote a function to handle the tagging, the prototype
> is like so:
> But that crashes too. At any rate, now that I look at the class definition for
> FileRef I don't know why doing
> TagLib::FileRef f (path);
> Works if I'm just using char*, because I don't see a constructor that takes a char*.

At first glance, I can't tell you why using a TagLib String would cause a crash. 
  Have you tried looking at the string after conversion?

However, I can tell you why using a char* works.

Here's the constructor:

FileRef (FileName fileName, bool readAudioProperties=true, 
AudioProperties::ReadStyle audioPropertiesStyle=AudioProperties::Average)

FileName is a const char*.  So that's the constructor you are calling with the 
default values.


More information about the taglib-devel mailing list