I'm on Python 2 (also tested on 3), OSX, FontForge 20161012. (same setup as #3057)
Importing an outline from a filename that is itself unicode fails. The easy workaround is to rename the file, but it would be nice to have unicode support for filenames (some filesystems support it, after-all).
The code to reproduce:
$ cat unicode_import.py
# -*- coding: utf-8 -*-
import fontforge
font = fontforge.font()
font.encoding = "UnicodeFull"
filename_with_unicode = 'cake_🎂.svg'
c = font.createMappedChar(ord('A'))
c.importOutlines(filename_with_unicode)
$ python unicode_import.py
Traceback (most recent call last):
File "unicode_import.py", line 11, in <module>
c.importOutlines(filename_with_unicode)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 5: ordinal not in range(128)
I'm on Python 2 (also tested on 3), OSX, FontForge 20161012. (same setup as #3057)
Importing an outline from a filename that is itself unicode fails. The easy workaround is to rename the file, but it would be nice to have unicode support for filenames (some filesystems support it, after-all).
The code to reproduce: