cstring returning invalid encoding? mp3's

Jeff Mitchell mitchell at kde.org
Mon Sep 21 23:24:39 CEST 2009


Caleb Cushing wrote:
> made a more simple prorgram... to test with
> 
> #include <iostream>
> #include <cstring>
> #include <cstdio>
> #include <fileref.h>
> #include <tag.h>
> #include <tstring.h>
> using namespace std;
> int main()
> {
>     TagLib::FileRef tfile("/home/music/R/Rihanna/Music_of_the_Sun/12-Now_I_Know-
>     cout << tfile.tag()->title() << endl;
> 
>     const char *ttitle = tfile.tag()->title().toCString(true);
> 
>     while(*ttitle) {
>         cout << hex << static_cast<int> (*ttitle++) << " ";
>     }
>     cout << endl;
> }
> 
> compiled with
> g++ -I /usr/include/taglib -l tag tags.cpp -o tagger

Using your exact program (with a different file of course) and your
exact compile statement, I don't have the issues you are seeing.

jmitchell at heifertosh ~/scratch/taglib-test  $  ./tagger
My Name is Jonas
70 ffffffad 60
jmitchell at heifertosh ~/scratch/taglib-test  $  ./tagger
My Name is Jonas
70 ffffffad 60
jmitchell at heifertosh ~/scratch/taglib-test  $  ./tagger
My Name is Jonas
70 ffffffad 60
jmitchell at heifertosh ~/scratch/taglib-test  $  ./tagger
My Name is Jonas
70 ffffffad 60

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: OpenPGP digital signature
Url : http://mail.kde.org/pipermail/taglib-devel/attachments/20090921/765003eb/attachment.sig 


More information about the taglib-devel mailing list