Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to disable Unicode rendering?
Forum Updated to NodeBB v4.3 + New Features

How to disable Unicode rendering?

Scheduled Pinned Locked Moved General and Desktop
12 Posts 4 Posters 5.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zither
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • Z Offline
      Z Offline
      zither
      wrote on last edited by
      #2

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

      Thanks

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        I'm not sure we understood what you mean with "disable rendering of text in Qt"....

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • Z Offline
          Z Offline
          zither
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on last edited by
            #5

            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...

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              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?

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • Z Offline
                Z Offline
                zither
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dangelog
                  wrote on last edited by
                  #8

                  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.

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

                  1 Reply Last reply
                  0
                  • Z Offline
                    Z Offline
                    zither
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dangelog
                      wrote on last edited by
                      #10

                      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.

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

                      1 Reply Last reply
                      0
                      • Z Offline
                        Z Offline
                        zither
                        wrote on last edited by
                        #11

                        Thanks for your info.

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

                        @QString::setUnicodeVersion(UnicodeVersion);@

                        Thanks

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          andre
                          wrote on last edited by
                          #12

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

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved