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

Can't convert unicode char ✓ (U+2713) #138

Open
Gamecraft400 opened this issue Dec 19, 2024 · 5 comments
Open

Can't convert unicode char ✓ (U+2713) #138

Gamecraft400 opened this issue Dec 19, 2024 · 5 comments

Comments

@Gamecraft400
Copy link

I try to convert a old docx file with markitdown.

charmap return this error :

Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "[Hide]\Python\Python313\Scripts\markitdown.exe\__main__.py", line 7, in <module> sys.exit(main()) ~~~~^^ File "[Hide]\Python313\Lib\site-packages\markitdown\__main__.py", line 43, in main print(result.text_content) ~~~~~^^^^^^^^^^^^^^^^^^^^^ File "[Hide]\Python\Python313\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\u261e' in position 5820: character maps to <undefined>

@Gamecraft400 Gamecraft400 changed the title Can't convert te unicode char ✓ (U+2713) Can't convert unicode char ✓ (U+2713) Dec 19, 2024
@l-lumin
Copy link
Contributor

l-lumin commented Dec 19, 2024

#116

@ebrahym-hol
Copy link

i want know how can hacking the software

@Gamecraft400
Copy link
Author

I've found a solution. In my case, my docx document is encoded in UTF8,

I've just set PYTHONUTF8=1

And it works now

@jromal
Copy link

jromal commented Dec 24, 2024

This should be the default. UTF-8 should be the default everywhere. We are hading towards 2025. This is not 1996.

@doggy8088
Copy link

I use python -X utf8 -m markitdown to solve this issue. I totally agreed how @jromal said, the UTF-8 should be default as always.

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

5 participants