microsoft / microsoft/markitdown

UnicodeEncodeError

Open Beginner friendly
#1,788 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

I encountered a problem:

PS D:\Program Files\markitdown> markitdown '.\FreeRADIUS Technical Guide.pdf' > doc2.md
Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Python314\Scripts\markitdown.exe_main
.py", line 5, in
sys.exit(main())
~~~~^^
File "C:\Python314\Lib\site-packages\markitdown_main
.py", line 93, in main
handle_output(args, result)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "C:\Python314\Lib\site-packages\markitdown_main
.py", line 102, in _handle_output
print(result.text_content)
~~~~~^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'gbk' codec can't encode character '\u2022' in position 140: illegal multibyte sequence

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in markitdown/main.py at _handle_output, where the traceback shows result.text_content is printed. Reproduce the command on Windows with the supplied PDF and inspect how CLI output encoding is handled. Done means the command can emit the converted Markdown containing the bullet character without raising UnicodeEncodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.