Most likely it's unicode or some utf variant. You have to tell QString what is the source encoding so that it can transform the data to Unicode. First thing I'd try is to use QString::fromLocal8Bit().
Most likely it's unicode or some utf variant. You have to tell QString what is the source encoding so that it can transform the data to Unicode. First thing I'd try is to use QString::fromLocal8Bit().
There's no way.
I tried with QString::fromLocal8Bit(), QTextCodec::codecForLocale(), QTextCodec::codecForName("utf8") and QTextCodec::codecForName("utf16"). Nothing, the filename is not properly passed.
I'm stuck.
Other programs can open this file from command line (argv) without problems.
But what encoding did you try to set?
My Windows XP is configured to Spanish language (I don't know what encoding Windows uses). I have some files with Russian,Chinese or Japanese characters.
I can't find a way that a Qt program opens those files. I tried all conversions I previously said. There's no way, the non latin characters are converted to "?" (better say, the non latin characters are always "?", I print the filename to the console before trying any conversion and it shows "?").
I looked at the sources of qt-assistant. It uses QString::fromLocal8Bit() to convert the arguments in argv to unicode.
I made the following test: I created an html file with only latin characters, and tell the windows explorer to open it with assistant. It opens without problems. Now I change the name of the file, using cyrilic characters. I try to open again, but assistant shows an empty page.
So I start thinking that Qt can't open this kind of filenames.
But other windows applications anyhow open them without problems.
Bookmarks