jbmohler / matplotlib-winbuild

The Unlicense
42 stars 31 forks source link

force utf-8 encoding #9

Closed davidhcefx closed 2 years ago

davidhcefx commented 4 years ago

Needed to force 'utf-8' encoding, otherwise it would throw an exception on my machine:

Traceback (most recent call last):
  File "buildall.py", line 58, in <module>
    main(options)
  File "buildall.py", line 13, in main
    utils.build_freetype()
  File "C:\Users\davidhcefx\matplotlib-winbuild\utils.py", line 225, in build_freetype
    fixproj(os.path.join(ft_dir, 'builds', 'win32', vc, 'freetype.sln'), WinXX)
  File "C:\Users\davidhcefx\matplotlib-winbuild\utils.py", line 44, in fixproj
    fd.write(content)
UnicodeEncodeError: 'cp950' codec can't encode character '\ufeff' in position 0: illegal multibyte sequence

As well as others': https://github.com/jbmohler/matplotlib-winbuild/issues/6