Qt/TagLib special chatacter
Vladimír Jícha
vladimir.jicha at gmail.com
Thu Aug 18 16:09:48 UTC 2016
I use this in my app:
#ifdef Q_OS_WIN32
TagLib::FileRef fileRef(reinterpret_cast<const wchar_t
*>(fileName.utf16()), true);
//TagLib::FileRef fileRef(reinterpret_cast<const wchar_t
*>("c:/Qt/projects/Audio_tests/test.mp3"), true);
//qDebug() << reinterpret_cast<const wchar_t *>(fileName.utf16());
// << fileName;
#else
QByteArray encodedFileName = QFile::encodeName(fileName);
TagLib::FileRef fileRef(encodedFileName.constData(), true);
#endif
You could try it...
Best regards,
Vladimir
Dne 16.8.2016 v 23:00 Ossigeno napsal(a):
> Tried this
> QByteArraymyTaggger=newTagLib::FileRef(tmp.toLocal8Bit());
>
> Qt Creator returns this error:
>
> error: conversion from 'QByteArray' to 'TagLib::File*' is ambiguous
> QByteArray myTaggger = new TagLib::FileRef(tmp.toLocal8Bit()); ^
>
> --------- Original Message --------
> Da: taglib-devel at kde.org
> To: "taglib-devel at kde.org" <taglib-devel at kde.org>
> Oggetto: Re: Qt/TagLib special chatacter
> Data: 15/08/16 03:25
>
> Hi,
> In my own application, I used :
> filename->toLocal8Bit()
> such as : myTaggger = new
> TagLib::FileRef(filename->toLocal8Bit());
> Hope, it helps.
> Renaud G.
> On 15/08/2016 01:53, Marco Atzori wrote:
>
> I have a this filename: "?? Feels So Good (sonique Best Remix
> Extended Version) Music Song Video ? love romantic "
>
> Usually, to extract the file information I use this code
>
> |QStringmediafile
> =playlist->currentMedia().canonicalUrl().toString();TagLib::FileReff(QFile::encodeName(mediafile).constData());
> |
> /This code works perfectly/, only does not work when the file
> name contains special characters as above. I tried
>
> |QTextCodec*codec =QTextCodec::codecForName("UTF-8"); | and
>
> |mediafile.toUtf8()| with no results. Any solution?
>
>
>
> ----
> ZE-Light e ZE-Pro: servizi zimbra per caselle con dominio email.it,
> per tutti i dettagli clicca qui
> <http://posta.email.it/caselle-di-posta-z-email-it/?utm_campaign=email_Zimbra_102014=main_footer>
>
> Sponsor:
> Idee regalo classiche o alternative? Trova l'offerta migliore in un click
> Clicca qui <http://adv.email.it/cgi-bin/foclick.cgi?mid=13327&d=20160816>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20160818/f880fd1f/attachment.html>
More information about the taglib-devel
mailing list