cstring returning invalid encoding? mp3's
Caleb Cushing
xenoterracide at gmail.com
Mon Sep 21 10:21:58 CEST 2009
changed my code around a little
if ( is_regular_file(*iter)) {
const char *tpath = iter->path().string().c_str();
TagLib::FileRef tfile(tpath);
const char *ttitle = tfile.tag()->title().toCString(true);
// convert to cstring for libpqxx
cout
<< iter->filename() << "\n"
<< tfile.tag()->title() << "\n" // outputs fine
<< ttitle << endl; // outputs nothing
or garbage for at least select mp3's...
even with toCString(true) set I still get the invalid byte sequence
for utf8 sometimes.
--
Caleb Cushing
http://xenoterracide.blogspot.com
More information about the taglib-devel
mailing list