Skip to content

Does not work if filename has non-English characters #335

@denivic

Description

@denivic

The following code fails if the file has æ, å or ø in it. I can imagine it would fail with other non-English characters as well. Would it be possible to fix this?

import magic as m

print(m.from_file(r'C:\Users\------\Desktop\data\æøå.pdf'))

Error:

cannot open `C:\Users\------\Desktop\data\æøå.pdf' (No such file or directory)

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