Dear All, TagLib::FileRef f( [filename UTF8Str...

Stephen F. Booth me at sbooth.org
Wed May 20 18:05:57 CEST 2009


> TagLib::FileRef f( [filename UTF8String]);

This is way off topic for this list, but when passing NSStrings to
functions expecting paths, always use fileSystemRepresentation, not
UTF8String.

> mytag->title();
> nsTitle=[NSString stringWithCString:title.toCString(true) encoding:NSUTF8StringEncoding];
>
> if title is chinese,it will be messy code!
> how can i solve it?

This should work- I take the same approach in Max, Tag and Play with
no problems (see
http://bazaar.launchpad.net/%7Esbooth/playosx/main/annotate/head%3A/Audio/Metadata/Readers/MP3MetadataReader.mm).
 If you want to send me more sample code offline I will be happy to
take a look.

Stephen


More information about the taglib-devel mailing list