Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-141

QFile cannot open filenames with unicode characters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 1.1.1
    • PySide
    • None
    • Platform: Debian Wheezy - Linux x86_64
      Filesystem: ext4
      Python version: 2.7.3
      Qt version: 4.8.2
      PySide version: 1.1.1

    Description

      Any path containing non-ascii characters can not be opened by QFile.
      e.g. "/home/user/bíó.txt"

      I have tried passing decoded unicode strings as well as encoded utf8 bytestrings with no effect.
      I also tried using the QFile.encodeName and decodeName functions but all that did was strip the unicode characters from the filename.

      This is also true for QImage (and probably others), but I assume that all goes through QFile.

      I attached a script to demonstrate. If the problem occurs, its output should read:

      somefile.txt was opened successfully: True
      einhverskrá.txt was opened successfully: False
      somefile.txt exists: True
      einhverskrá.txt exists: True

      Attachments

        1. pyside-141-qfilebug.py
          0.7 kB
        2. qfilebug.py
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            steinitzu Steinþór Pálsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes