This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Can't parse files with BOM #45
Comments
I suppose the other facet is if the file needs to be rewritten, does it get rewritten with the BOM if it had one before? (I also noticed that DOS files get re-written as UNIX files, which is a separate issue...) |
Hi @mwtoews Thanks for your report - do you want to submit a pull request to fix this? |
I'll take a look... |
I think something like this
should be enough. I'll try to get something out today, there's another issue to fix |
I have something similar, but I'm also looking at line breaks too ... |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
absolufy-imports 0.3.0 cannot parse a python file with a BOM.
For example, download bom.py.txt and rename it
bom.py
(this is a necessary step on GitHub as only *.txt files can be attached), move it into an example project (e.g. src), see the following:Perhaps a better message could help? Or try to compare these two uses reading the source file, the last with
encoding='utf-8-sig'
:The text was updated successfully, but these errors were encountered: