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. QString unicode.
Qt 6.11 is out! See what's new in the release blog

QString unicode.

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 1.3k Views 2 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.
  • T Offline
    T Offline
    Trikrista
    wrote on last edited by
    #1

    I have string "Z\u00fcrich"
    How do I make from it "Zürich"?

    I'm sorry for my bad English

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Where do you want "Zürich" to appear ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Trikrista
        wrote on last edited by
        #3

        For example, in QLineEdit or save in file.

        I'm sorry for my bad English

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What locale are you using ? If it's e.g. Switzerland, you should see Zürich properly on your QLineEdit directly when calling setText("Z\u00fcrich")

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Trikrista
            wrote on last edited by
            #5

            I am using english locale.

            I get "Z\u00fcrich" on the network. And I need to program transformed her in "Zürich".

            I'm sorry for my bad English

            1 Reply Last reply
            0
            • M Offline
              M Offline
              ManhNT
              wrote on last edited by
              #6

              Sorry I don't know for sure, but I'm using Vietnamese with QString like this: QString::fromUtf8("Xin chào");
              Maybe utf8 will work for you too.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                Trikrista
                wrote on last edited by Trikrista
                #7

                it is not(((
                I got a string in this form "Z\u00fcrich".

                I have something like this:
                QString str = "Z\u00fcrich";
                QString str1 = str.someFunction();
                qDebug() << str1;

                Output to the log: "Zürich"

                I'm sorry for my bad English

                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