Hi again :). So I can now tag MP3s from my plugin, youtubemp3podcaster (<a href="https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/">https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/</a>). But I&#39;m struggling with Unicode. I wrote a function to handle the tagging, the prototype is like so:<br>
<br>NS_IMETHODIMP MyComponent::Tag(const PRUnichar *path, const PRUnichar *title, const PRUnichar *artist, const PRUnichar *album, const PRUnichar *comment, const PRUnichar *genre, const PRUnichar *year, const PRUnichar *track)<br>
<br>I&#39;m building under Windows, so as near as I can tell from here: <a href="https://developer.mozilla.org/En/PRUnichar">https://developer.mozilla.org/En/PRUnichar</a><br><br>the PRUnichars are just wchar_t points, which if I understand right is just UTF16 encoded strings. Here&#39;s how the docs say PRUnichar is defined:<br>
<br>#if defined(NS_WIN32)<br>  typedef wchar_t PRUnichar;<br>#else<br>  typedef PRUInt16 PRUnichar;<br>#endif<br><br><br>I was hoping I could just do :<br><br>TagLib::FileRef f (path);<br><br>but that blows up with a memory error, I think because FileRef expects a simple pointer to char and I&#39;m trying to send in a PRUnichar. So then I tried to build a TagLib::String object hoping to pass it to FileRef, like so:<br>
<br>TagLib::String myFileName( (wchar_t*) path, TagLib::String::UTF16 );<br><br>But that crashes too. At any rate, now that I look at the class definition for FileRef I don&#39;t know why doing <br><br>TagLib::FileRef f (path);<br>
<br>Works if I&#39;m just using char*, because I don&#39;t see a constructor that takes a char*.<br><br>If I have too I can use native types instead of PRUnichar, but it&#39;d be nice if I could use it since it&#39;ll make the Linux &amp; Mac OSX ports much easier.<br>
<br>I know TagLib supports Unicode, but I can&#39;t figure out what I&#39;m doing wrong. Am I just casting to the wrong types or is it more complex? <br><br>Thanks again!<br>