PDA

View Full Version : unable to display unicode from file at run time



sanjeet
25th March 2013, 10:53
hi.....

I am trying to read a file at run time that contains hindi unicode and then to have corresponding character get displayed on QTextEdit.
But I am unable to get translated code. I am getting some other format(seems to be garbage).
I am sure that the file is encoded as UTF-8. I have worked with QTextStream, setted unicode to UTF-8.
Even got nothing.

When i passed same hindi text or its unicode directly to QString::fromUtf8("\u0928"), working fine.

But when done the same via file I am unable to get translated string.

Please anyone guide me regarding this context.

Thanks for your help in advance.