Always write C code in UTF-8
Some people apparently use non-utf8 locales and this caused errors when xcb-proto started using some "fancy" quote marks. Fix this by always using utf8 encoding. Fixes: https://gitlab.freedesktop.org/xorg/lib/libxcb/-/issues/72 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
389f22d1cb
commit
b78d304531
|
@ -331,7 +331,7 @@ def c_close(self):
|
||||||
_h(' */')
|
_h(' */')
|
||||||
|
|
||||||
# Write header file
|
# Write header file
|
||||||
hfile = open('%s.h' % _ns.header, 'w')
|
hfile = open('%s.h' % _ns.header, 'w', encoding='UTF-8')
|
||||||
for list in _hlines:
|
for list in _hlines:
|
||||||
for line in list:
|
for line in list:
|
||||||
hfile.write(line)
|
hfile.write(line)
|
||||||
|
@ -339,7 +339,7 @@ def c_close(self):
|
||||||
hfile.close()
|
hfile.close()
|
||||||
|
|
||||||
# Write source file
|
# Write source file
|
||||||
cfile = open('%s.c' % _ns.header, 'w')
|
cfile = open('%s.c' % _ns.header, 'w', encoding='UTF-8')
|
||||||
for list in _clines:
|
for list in _clines:
|
||||||
for line in list:
|
for line in list:
|
||||||
cfile.write(line)
|
cfile.write(line)
|
||||||
|
|
Loading…
Reference in New Issue