Skip to content

Cannot handle non-ascii rar file name. #10

Description

@HinTak

You don't need the actual rar file - just create an empty file with the name below would reproduce the bug:

>>> from unrar import rarfile
>>> rar = rarfile.RarFile("[字型][文鼎] 29套 字體.rar")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "unrar/rarfile.py", line 127, in __init__
    archive = unrarlib.RAROpenArchiveDataEx(filename, mode=mode)
  File "unrar/unrarlib.py", line 157, in __init__
    CmtBufSize=ctypes.sizeof(self.CmtBuf))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 1: ordinal not in range(128)
>>> 

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions