Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-958

Errors when directory / file names contain unicode characters

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 1.3.2
    • Fix Version/s: 1.4
    • Component/s: Other
    • Labels:
      None
    • Environment:
      Windows

      Description

      When a directory or file containing unicode characters in the name is loaded by Picard with debug logging on, then the following error is issued:

      Traceback (most recent call last):
        File ".\picard\tagger.py", line 315, in event
          event.run()
        File ".\picard\util\thread.py", line 34, in run
          self.func(*self.args, **self.kwargs)
        File ".\picard\log.py", line 116, in _stderr_receiver
          sys.stderr.write(formatted_log_line(level, time, msg + os.linesep))
        File "C:\Program Files (x86)\Python2\lib\encodings\cp850.py", line 12, in encode
          return codecs.charmap_encode(input,errors,encoding_map)
      UnicodeEncodeError: 'charmap' codec can't encode character u'\u2010' in position 77: character maps to <undefined>

      This is due to the log.debug statements using %s placeholder instead of %r.

        Attachments

          Activity

            People

            • Assignee:
              sophist Sophist
              Reporter:
              sophist Sophist
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: