"C:\CI-Tools\msys64\mingw64\bin/python3.EXE" "../../src/vulkan/util/gen_enum_to_str.py" "--xml" "../../src/vulkan/registry/vk.xml" "--outdir" "C:/work/xemu/xemu-opengl/mesa/build/windows-mingw64/src/vulkan/util"
Traceback (most recent call last):
File "C:\work\xemu\xemu-opengl\mesa\src\vulkan\util\gen_enum_to_str.py", line 473, in <module>
main()
File "C:\work\xemu\xemu-opengl\mesa\src\vulkan\util\gen_enum_to_str.py", line 462, in main
f.write(template.render(
UnicodeEncodeError: 'gbk' codec can't encode character '\xa9' in position 107: illegal multibyte sequence
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14015>
for template, file_ in [(C_TEMPLATE, os.path.join(args.outdir, 'vk_enum_to_str.c')),
(H_TEMPLATE, os.path.join(args.outdir, 'vk_enum_to_str.h')),
(H_DEFINE_TEMPLATE, os.path.join(args.outdir, 'vk_enum_defines.h'))]:
- with open(file_, 'w') as f:
+ with open(file_, 'w', encoding='utf-8') as f:
f.write(template.render(
file=os.path.basename(__file__),
enums=enums,
# For outputting entrypoints.h we generate a anv_EntryPoint() prototype
# per entry point.
try:
- with open(args.out_h, 'w') as f:
+ with open(args.out_h, 'w', encoding='utf-8') as f:
guard = os.path.basename(args.out_h).replace('.', '_').upper()
f.write(TEMPLATE_H.render(guard=guard, **environment))
- with open(args.out_c, 'w') as f:
+ with open(args.out_c, 'w', encoding='utf-8') as f:
f.write(TEMPLATE_C.render(**environment))
except Exception: