mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 01:57:13 +02:00
Fixed "UnicodeEncodeError" when a build output contains non-ASCII characters // Resolve #3971
This commit is contained in:
@ -18,7 +18,7 @@ PlatformIO Core 5
|
|||||||
- Fixed an issue when the ``$PROJECT_DIR`` variable was not properly replaced in the `debug_server <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-server>`__ option (`issue #4086 <https://github.com/platformio/platformio-core/issues/4086>`_)
|
- Fixed an issue when the ``$PROJECT_DIR`` variable was not properly replaced in the `debug_server <https://docs.platformio.org/page/projectconf/section_env_debug.html#debug-server>`__ option (`issue #4086 <https://github.com/platformio/platformio-core/issues/4086>`_)
|
||||||
- Fixed an issue when `PIO Remote <https://docs.platformio.org/page/plus/pio-remote.html>`__ device monitor crashes on the first keypress (`issue #3832 <https://github.com/platformio/platformio-core/issues/3832>`_)
|
- Fixed an issue when `PIO Remote <https://docs.platformio.org/page/plus/pio-remote.html>`__ device monitor crashes on the first keypress (`issue #3832 <https://github.com/platformio/platformio-core/issues/3832>`_)
|
||||||
- Fixed "Do not know how to make File target 'debug'" issue when debugging project using `CLion IDE <https://docs.platformio.org/page/integration/ide/clion.html>`__ (`pull #4089 <https://github.com/platformio/platformio-core/issues/4089>`_)
|
- Fixed "Do not know how to make File target 'debug'" issue when debugging project using `CLion IDE <https://docs.platformio.org/page/integration/ide/clion.html>`__ (`pull #4089 <https://github.com/platformio/platformio-core/issues/4089>`_)
|
||||||
|
- Fixed "UnicodeEncodeError" when a build output contains non-ASCII characters (`issue #3971 <https://github.com/platformio/platformio-core/issues/3971>`_)
|
||||||
|
|
||||||
5.2.2 (2021-10-20)
|
5.2.2 (2021-10-20)
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
@ -110,6 +110,8 @@ class PlatformRunMixin(object):
|
|||||||
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
|
args.append("%s=%s" % (key.upper(), self.encode_scons_arg(value)))
|
||||||
|
|
||||||
proc.copy_pythonpath_to_osenv()
|
proc.copy_pythonpath_to_osenv()
|
||||||
|
# force SCons output to Unicode
|
||||||
|
os.environ["PYTHONIOENCODING"] = "utf-8"
|
||||||
|
|
||||||
if targets and "menuconfig" in targets:
|
if targets and "menuconfig" in targets:
|
||||||
return proc.exec_command(
|
return proc.exec_command(
|
||||||
|
@ -30,7 +30,9 @@ from platformio.compat import (
|
|||||||
class AsyncPipeBase(object):
|
class AsyncPipeBase(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._fd_read, self._fd_write = os.pipe()
|
self._fd_read, self._fd_write = os.pipe()
|
||||||
self._pipe_reader = os.fdopen(self._fd_read, errors="backslashreplace")
|
self._pipe_reader = os.fdopen(
|
||||||
|
self._fd_read, encoding="utf-8", errors="backslashreplace"
|
||||||
|
)
|
||||||
self._buffer = ""
|
self._buffer = ""
|
||||||
self._thread = Thread(target=self.run)
|
self._thread = Thread(target=self.run)
|
||||||
self._thread.start()
|
self._thread.start()
|
||||||
|
Reference in New Issue
Block a user