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

pyside2-uic.exe generated incorrectly encoded .py file

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: PySide
    • Labels:
      None

      Description

      I keep copy of pyside2-uic.exe in my ./tools folder and .ui file in ./res as you can see below

      .\tools\pyside2-uic.exe .\res\layout.ui > .\res\layout.py

      First line of generated file is

      # -*- coding: utf-8 -*-

      But created file is UTF-16 LE and this is because i used PowerShell. After manually saving as UTF-8 everything works fine.

      My suggestion is - if this program specifies encoding in the output string it certainly would be better to force it by creating output file (with path specified as an argument) instead of using ">" pipe for saving the output.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            crmaurei Cristian Maureira-Fredes
            Reporter:
            tomaszu97 Tomasz Jakubowski
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes