View Full Version : Encoding of characters in frensh ?
hassinoss
21st February 2014, 12:09
I want to encode character like "é" and "à " without using the code of the character every time.
I tried with tr() for example tr("Propriété") but is not worked.
Im using Visual studio 2012 and Qt5.
iugo
21st February 2014, 13:34
Try to use : _fromUtf8 = QtCore.QString.fromUtf8
and then my_str = _fromUtf8(my_str)
hassinoss
21st February 2014, 15:21
Thanx for your reply but i want a generic method to do this instead of changing every QString in my code
anda_skoa
21st February 2014, 18:22
Qt5 assumes that your files are encoded in UTF-8.
http://www.macieira.org/blog/2012/05/source-code-must-be-utf-8-and-qstring-wants-it/
Just change your file encoding to UTF-8
Cheers,
_
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.