October 11, 2011

zither zither
Lab Rat
147 posts

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

11 replies

October 21, 2011

zither zither
Lab Rat
147 posts

So, there is no way to disable rendering of text in Qt?

Thanks

October 21, 2011

Volker Volker
Robot Herder
5428 posts

I’m not sure we understood what you mean with “disable rendering of text in Qt”….

October 22, 2011

zither zither
Lab Rat
147 posts

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

October 22, 2011

Andre Andre
Area 51 Engineer
6031 posts

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…

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

October 22, 2011

Volker Volker
Robot Herder
5428 posts

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 0×00 to 0×7F). How would you handle everything above 0×7F in that case? How should a character like the european Euro sign (€ = 0×20AC) or a German umlaut (e.g. Ö = 0×00D6) be displayed in a QLabel if the underlying QString had not interpreted it correctly?

October 26, 2011

zither zither
Lab Rat
147 posts

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

October 26, 2011

peppe peppe
Ant Farmer
1025 posts

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.

 Signature 

Software Engineer
KDAB (UK) Ltd., a KDAB Group company

October 26, 2011

zither zither
Lab Rat
147 posts

Thanks for your advice.

Actually, I would like to render Unicode 5.2 characters.
Unicode 4.0 is used [doc.qt.nokia.com] 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

October 26, 2011

peppe peppe
Ant Farmer
1025 posts

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.

 Signature 

Software Engineer
KDAB (UK) Ltd., a KDAB Group company

October 27, 2011

zither zither
Lab Rat
147 posts

Thanks for your info.

So, is there any way to set Unicode rendering like that without patch?

  1. QString::setUnicodeVersion(UnicodeVersion);

Thanks

October 27, 2011

Andre Andre
Area 51 Engineer
6031 posts

No, I don’t think there is a way. This is not something Qt offers as a simple flag.

 Signature 

Looking for Qt developers to join our team @ i-Optics: https://qt-project.org/forums/viewthread/25393/

 
  ‹‹ [solved] Which mouse button caused the mousePressEvent in a graphics scene?      QSortFilterModel - filter multiple columns ››

You must log in to post a reply. Not a member yet? Register here!