[vlc-devel] [PATCH] Qt: PLTreeView: Fix name encoding in the tooltip

Naohiro KORIYAMA nkoriyama at gmail.com
Fri Jun 15 07:45:40 CEST 2012


I found the articles about QString and UTF-8.
http://labs.qt.nokia.com/2011/03/26/on-utf-8-latin-1-and-charsets/
http://labs.qt.nokia.com/2011/03/25/qstrings-and-unicode-optimising-qstringfromutf8/

So, I think using QString::fromUtf8() is better.

2012/6/15 Naohiro KORIYAMA <nkoriyama at gmail.com>:
> Hello,
>
> Recently, "Qt: PLTreeView: Fix name encoding in the tooltip" was
> committed, but the title (name) in the tooltip is not correctly
> decoded.
> Because QString converts the const char * data into Unicode using the
> fromAscii() function.
> There are two approaches: using QTextCodec::setCodecForCStrings() or
> using QString::fromUtf8().
> I use QString::fromUtf8(), because using setCodecForCStrings affects
> all the codec used by QString.
>
> Best regards,
>
> --
> KORIYAMA, Naohiro
> nkoriyama at gmail.com



-- 
KORIYAMA, Naohiro
nkoriyama at gmail.com



More information about the vlc-devel mailing list