Closed FutureEngineeer closed 1 year ago
This may fix your problem, but it might also break the parser for other users .. KiCad as well as the open()
function uses UTF-8 as default as far as i know. So it seems like the file you are trying to parse is not ASCII or UTF-8 encoded.
I won't change the default encoding in all file-related functions, but i could add another parameter with which you could specify a different encoding (if converting your files to UTF-8 is not possible).
Thank you, I think this can solve the problem for files in which using languages other than English
Added a new parameter encoding
to all file-related functions in #50. Will be released in v1.2.2 asap later this week.
Thanks for pointing this out!
Problem: if there are characters in a file (for example, in a text field) that are not contained in the standard encoding, then a UnicodeDecodeError error occurs: 'charmap' codec can't decode byte: character maps to
Solution: when opening a file and writing to a file, you can use encoding='cp437'
For example in schematic.py: