mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Save temporary file in unicode for INO2CPP
This commit is contained in:
@ -15,6 +15,7 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
import atexit
|
import atexit
|
||||||
|
import io
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
from os import environ, remove, walk
|
from os import environ, remove, walk
|
||||||
@ -84,7 +85,7 @@ class InoToCPPConverter(object):
|
|||||||
|
|
||||||
def _gcc_preprocess(self, contents, out_file):
|
def _gcc_preprocess(self, contents, out_file):
|
||||||
tmp_path = mkstemp()[1]
|
tmp_path = mkstemp()[1]
|
||||||
with open(tmp_path, "w") as fp:
|
with io.open(tmp_path, mode="w", encoding="utf-8") as fp:
|
||||||
fp.write(contents)
|
fp.write(contents)
|
||||||
self.env.Execute(
|
self.env.Execute(
|
||||||
self.env.VerboseAction(
|
self.env.VerboseAction(
|
||||||
|
Reference in New Issue
Block a user