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 read Japanese and Korean characters?
Forum Updated to NodeBB v4.3 + New Features

How to read Japanese and Korean characters?

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 4 Posters 804 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.
  • H Offline
    H Offline
    harish__rajora
    wrote on last edited by
    #1

    I have a file whose name is in Japanese or Korean. I save that to QString but utf8() on it gives ???

    Any solutions?

    1 Reply Last reply
    1
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #4

      qDebug() on your Windows console? Blame MS :)
      Print them in a QMessageBox or QLabel.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

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

        Hi,

        Where do you see these question marks ?

        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
        • H Offline
          H Offline
          harish__rajora
          wrote on last edited by
          #3

          When I qDebug() I see these characters as question marks.
          qDebug()<<fileName.toUtf8().data()

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            qDebug() on your Windows console? Blame MS :)
            Print them in a QMessageBox or QLabel.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • H Offline
              H Offline
              harish__rajora
              wrote on last edited by
              #5

              Yeah QMessageBox works fine.

              What the hell. Is there any way possible?

              Christian EhrlicherC 1 Reply Last reply
              0
              • H harish__rajora

                Yeah QMessageBox works fine.

                What the hell. Is there any way possible?

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #6

                @harish__rajora said in How to read Japanese and Korean characters?:

                Is there any way possible?

                No, the console can not print anything useful if you don't know the correct code page.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  harish__rajora
                  wrote on last edited by
                  #7

                  If I read a folder whose name is in Japanese using QString. Now I need to convert this to char * to pass it to my other function. Can I do that?

                  jsulmJ 1 Reply Last reply
                  0
                  • H harish__rajora

                    If I read a folder whose name is in Japanese using QString. Now I need to convert this to char * to pass it to my other function. Can I do that?

                    jsulmJ Online
                    jsulmJ Online
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #8

                    @harish__rajora Why do you need char*?

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      harish__rajora
                      wrote on last edited by
                      #9

                      I have a library that is not built by me by my company. I can't change that. It takes char * as input.

                      jsulmJ 1 Reply Last reply
                      0
                      • H harish__rajora

                        I have a library that is not built by me by my company. I can't change that. It takes char * as input.

                        jsulmJ Online
                        jsulmJ Online
                        jsulm
                        Lifetime Qt Champion
                        wrote on last edited by
                        #10

                        @harish__rajora said in How to read Japanese and Korean characters?:

                        It takes char * as input

                        And what encoding does it expect? ASCII, UTF16, UTF8, ...?
                        For Japanese you have to use Unicode and that can't be represented in normal C ASCII string (char*).

                        https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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