Open aa956 opened 2 months ago
Setting environment variable PYTHONUTF8=1
does not work with FreeCAD.
According to this: https://forum.freecad.org/viewtopic.php?p=451120#p451120
Found working fix that does not require patching fcad_pcb and kicad_parser.
Before importing fcad_pcb:
import _locale
_locale._getdefaultlocale = (lambda *args: ['en_US', 'utf8'])
Opening any PCB containing non-ASCII characters on Windows results in:
Also had a similar problem when
kicad_common.json
containedworking_dir
with non-ASCII characters.Had to make 2 changes to fix. Probably a good idea to review all of the
open()
calls?One change in
kicad_parser/kicad_pcb.py
Another in
kicad.py
Actually I'm not sure why the Windows system encoding is used at all, FreeCAD python console shows utf-8 is default?