How to disable Unicode rendering?
-
Dear all,
As we know, current unicode version of Qt is 4.0 & latest unicode version is 6.0.
That's a huge gap.But, I read about some news in Qt bugs that, Qt will upgrade Unicode database to 6.0 in Qt 5.0.
But, in current situation some unicode characters changes in Unicode 5.x & above can't show correctly in current version of Qt.
In text rendering, Qt make automatically render the unicode characters.
So, how can I disable these text rendering function without recompiling of Qt?Thanks
-
So, there is no way to disable rendering of text in Qt?
Thanks
-
I'm not sure we understood what you mean with "disable rendering of text in Qt"....
-
Yes, that's what I mean.
For complex script text, unicode rendering is needed to show properly in output.Qt use its own engine for rendering of text. But it's too out of date unicode 4.0.
So, before meanwhile it upgrade to unicode 6.0. I want to disable this rendering.Thanks
-
I don't think that is possible, if I understand what you mean.
If you don't want unicode, then you should (I guess) simply make sure you limit yourself to the ASCII set. Right? Not sure why you would want to do that, but... -
QString is Unicode internally, so I do not see how one could "disable" it at all (despite limiting oneself to plain 7bit ASCII in the range of 0x00 to 0x7F). How would you handle everything above 0x7F in that case? How should a character like the european Euro sign (€ = 0x20AC) or a German umlaut (e.g. Ö = 0x00D6) be displayed in a QLabel if the underlying QString had not interpreted it correctly?
-
Thanks for all,
I want to use Unicode Character but don't want rendering engine(i.e., harfbuzz engine is used in Qt)
This harfbuzz engine is too old and I want to disable harfbuzz rendering of text in Qt.
That's what I mean.
Thanks
-
AFAIK Qt supports Unicode 5.0 since Qt 4.3. Still, I don't think you can get what you want without hacking inside Qt text drawing internals.
-
Thanks for your advice.
Actually, I would like to render Unicode 5.2 characters.
"Unicode 4.0 is used":http://doc.qt.nokia.com/latest/unicode.html as native character set in Qt.Currently, I solved that problem by editing Qt source code and compile again. But, I don't want to use like that. AFAIK, Qt will upgrade its unicode database to 6.0 at Qt 5 not Qt 4.8.
Thanks
-
I guess that that page has not been updated -- the changelog for 4.3 clearly states that the table were upgraded to 5.0: http://qt.nokia.com/products/changes/changes-4.3.0/
And yes, you're correct about Unicode 6 support in Qt 5. Although, if you want to backport the support to Qt 4, you're encouraged to submit a patch for that.
-
Thanks for your info.
So, is there any way to set Unicode rendering like that without patch?
@QString::setUnicodeVersion(UnicodeVersion);@
Thanks
-
No, I don't think there is a way. This is not something Qt offers as a simple flag.