Skip to content

Commit b6bf097

Browse files
committed
fix python file encoding error on Windows
1 parent ed2c4e4 commit b6bf097

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

libcxx/utils/generate_libcxx_cppm_in.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,19 @@
99
import os.path
1010
import sys
1111

12-
from libcxx.header_information import module_c_headers, module_headers, header_restrictions, headers_not_available, libcxx_root
12+
from libcxx.header_information import (
13+
module_c_headers,
14+
module_headers,
15+
header_restrictions,
16+
headers_not_available,
17+
libcxx_root,
18+
)
1319

1420

1521
def write_file(module):
16-
with open(libcxx_root / "modules" / f"{module}.cppm.in", "w") as module_cpp_in:
22+
with open(
23+
libcxx_root / "modules" / f"{module}.cppm.in", "w", encoding="utf-8"
24+
) as module_cpp_in:
1725
module_cpp_in.write(
1826
"""\
1927
// -*- C++ -*-
@@ -25,6 +33,7 @@ def write_file(module):
2533
//
2634
//===----------------------------------------------------------------------===//
2735
36+
2837
// WARNING, this entire header is generated by
2938
// utils/generate_libcxx_cppm_in.py
3039
// DO NOT MODIFY!

0 commit comments

Comments
 (0)