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. Japanese letters in file path converted into question mark(?). How can i deal with them?
Forum Updated to NodeBB v4.3 + New Features

Japanese letters in file path converted into question mark(?). How can i deal with them?

Scheduled Pinned Locked Moved Unsolved General and Desktop
japanesechinesefilepath
2 Posts 2 Posters 537 Views
  • 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.
  • P Offline
    P Offline
    Pardeep
    wrote on 29 Jan 2021, 10:20 last edited by
    #1

    Hi,
    I have a folder in Japanese language like this "E:/QT projects/Path_in_Chinese/ランゲージ/ランゲージ/New folder/testbuilding.IVE".
    When i print the path and check existence of file then the output is:

    • code:
      QString fileName1 = "E:/QT projects/Path_in_Japanese/ランゲージ/ランゲージ/New folder/testbuilding.IVE";
      QFile f1(fileName1);
      qDebug()<<fileName1<<"\nExist: "<<f1.exists();

    • Output:
      "E:/QT projects/Path_in_Japanese/?????/?????/New folder/testbuilding.IVE"
      Exist: true

    How can i deal with these types of path. Thanks in advance.

    J 1 Reply Last reply 29 Jan 2021, 10:40
    0
    • P Pardeep
      29 Jan 2021, 10:20

      Hi,
      I have a folder in Japanese language like this "E:/QT projects/Path_in_Chinese/ランゲージ/ランゲージ/New folder/testbuilding.IVE".
      When i print the path and check existence of file then the output is:

      • code:
        QString fileName1 = "E:/QT projects/Path_in_Japanese/ランゲージ/ランゲージ/New folder/testbuilding.IVE";
        QFile f1(fileName1);
        qDebug()<<fileName1<<"\nExist: "<<f1.exists();

      • Output:
        "E:/QT projects/Path_in_Japanese/?????/?????/New folder/testbuilding.IVE"
        Exist: true

      How can i deal with these types of path. Thanks in advance.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 29 Jan 2021, 10:40 last edited by
      #2

      @Pardeep said in Japanese letters in file path converted into question mark(?). How can i deal with them?:

      qDebug()

      This is simply debug output, it can depend on the encoding in the console. Try

      qDebug()<<fileName1.toUtf8()<<"\nExist: "<<f1.exists();
      

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

      1 Reply Last reply
      3

      2/2

      29 Jan 2021, 10:40

      • Login

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