Symbols like € œ when given as part of text are displayed differently
-
Hi,
I have to display € œ as part of the text element. In the qml file the above symbols are shown properly but when i run the program. They are shown differently.Please let me know how i can resolve this problem. I have run it on desktop only.
Regards
Kusuma -
welcome to devnet
This must have to do with the different character sets used. Unfortunately (or maybe luckily), I am displaying only standard sets. But the section you need to focus on should be with "QLocale":http://qt-project.org/doc/qt-5.0/qtcore/qlocale.html
[edit] Hope this helps somehow. :)
-
Thanks for the reply.
Hi this is the qml file i have used ..
@
import QtQuick 1.0
Rectangle {
width: 360
height: 360
Text {
text: qsTr("Hello World € æ œ")
anchors.centerIn: parent
}
MouseArea {
anchors.fill: parent
onClicked: {
Qt.quit();
}
}
}
@
The output window shows diff characters for euro and french symbols. I am running this program in ubuntu 11.10. It must be using standard charsets right? I am not knowing how to link/use QLocale to this piece of code.you can find a snapshot of the output here -
http://www.qtforum.org/article/39544/symbols-like-€-œ-when-given-as-part-of-text-are-displayed-differently.html#post122227 -
Sorry, I did not pay attention that it was posted under Qt Quick. I am not of any help here.
Note: In order to make your code more readable you should use" code tagging/wrappings":http://qt-project.org/wiki/ForumHelp#e3f82045ad0f480d3fb9e0ac2d58fb01
I have introduced those for you in your last post.