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. QStandardPaths::standardLocations problem with non-English characters in username

QStandardPaths::standardLocations problem with non-English characters in username

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 1.4k 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.
  • C Offline
    C Offline
    che1404
    wrote on last edited by
    #1

    Hi all!
    I'm using Qt 5.5.1 on Windows 7 64 bits.
    I'm trying to get the user data folder using:

    QString path = QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();
    

    My windows 7 username is "userñame", with an "ñ", a non-English character.
    So path now contains:

    "C:/Users/user¤ame/AppData/Local/My Company/My product"
    

    Instead of:

    "C:/Users/userñame/AppData/Local/My Company/My product"
    

    When I log in with a user like "Roberto", then I get the path correctly.
    I've been reading out there. The guy here seems to have the same problem as me: https://bugreports.qt.io/browse/QTBUG-38954
    They conclude that's a system misconfiguration, but not sure what kind of misconfiguration?

    Anyone having problems getting the user data folder with a username with non-English characters?
    Is it a Qt issue, or a Windows 7 issue?

    Thanks!
    Robert.

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

      Hi,

      Is your Windows version configured in English and you are using Spanish characters ?

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

      C 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Is your Windows version configured in English and you are using Spanish characters ?

        C Offline
        C Offline
        che1404
        wrote on last edited by
        #3

        @SGaist No, this is a Spanish installation.

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

          Can you reproduce that with a minimal project ? Essentially main which prints the value returned by QStandardPaths::standardLocations(QStandardPaths::DataLocation).first();?

          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

          • Login

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