Version: 6.0.1
Interpreter: Python 3.11.2
OS: Windows 10 22H2 Build 19045.4894
Steps to reproduce
- Create a source file with exactly this content, for example 
orange.py: 
- Run 
isort --overwrite-in-place --lai 2 orange.py. 
- Results in the file being emptied and the warning: 
...isort\main.py:1214: UserWarning: Unable to parse file .\orange.py due to 'charmap' codec can't encode character '\u2205' in position 22: character maps to <undefined>   sort_imports(  # type: ignore. 
What I expected
While I understand what the warning is about, I expect isort to not silently delete source code because of a simple encoding error.