[Development] Why we *have to* remove codecFor... ?

Giuseppe D'Angelo dangelog at gmail.com
Sun Apr 22 14:33:40 CEST 2012


On 22 April 2012 11:50, Loaden <loaden at gmail.com> wrote:
>>  (I don't have any clue about MSVC).
>
> That the point! In current solution, It's does't work for this case if use
> MSVC Compiler.
> My Point:
> Please don't think about of MSVC users.
> Or, please give me a way to fix the problem.

I don't know. If that file is correct UTF-8 (with or without BOM) then
you must find a way to tell MSVC that your input and execution
charsets are UTF-8. If that fails for any reason (impossible / bug /
...), MSVC gets the nice "crap" mark Thiago was talking about.

Still, you need to change those tr() to trUtf8() or set UTF-8 as the
codec for tr. Also, notice that qDebug() is not Unicode safe -- it's
for debugging. Use something like qDebug() << string.toUtf8().toHex()
to be 100% sure it contains what you expect.

Cheers,
-- 
Giuseppe D'Angelo



More information about the Development mailing list