Skip to content

Commit

Permalink
Implemented a workaround for tables formatted with ascii characters u…
Browse files Browse the repository at this point in the history
…nder windows. Per Textualize/rich#3625
  • Loading branch information
zapta committed Jan 30, 2025
1 parent 1cbb08b commit 6f8aa15
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apio/scons/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
# -- Authors Juan Gonzáles, Jesús Arroyo
# -- Licence GPLv2


import sys
import platform
from apio.scons.scons_handler import SconsHandler
from apio.scons.plugin_util import maybe_wait_for_remote_debugger
from apio.common import apio_console

# -- A workaround for windows. Force stdout pipe to "utf-8" encoding.
# -- see https://github.com/Textualize/rich/issues/3625
if "win" in platform.system().lower() and sys.stdout.encoding != "utf-8":
sys.stdout.reconfigure(encoding="utf-8")

# -- We force terminal mode to cause the scons process to emit colors even
# -- though it outputs to a pipe to the parent apio process. The apio process
# -- will strip the colors if it itself is outputing to a pipe.
Expand Down

0 comments on commit 6f8aa15

Please sign in to comment.