Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert files with unicode characters in filenames #17

Open
gunpuz opened this issue Dec 8, 2020 · 0 comments
Open

How to convert files with unicode characters in filenames #17

gunpuz opened this issue Dec 8, 2020 · 0 comments

Comments

@gunpuz
Copy link

gunpuz commented Dec 8, 2020

Code:

from pylokit import Office
with Office("/usr/lib/libreoffice/program") as lo:
    with lo.documentLoad('/dummy-ų.doc') as doc:
        pass

Error:

Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
  File "/usr/local/lib/python3.7/dist-packages/pylokit/lokit.py", line 113, in documentLoad
    doc = self.lokit.pClass.documentLoad(self.lokit, six.b(url))
  File "/usr/local/lib/python3.7/dist-packages/six.py", line 628, in b
    return s.encode("latin-1")
UnicodeEncodeError: 'latin-1' codec can't encode character '\u0173' in position 7: ordinal not in range(256)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant