summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-05-09 13:53:46 +0000
committerQMK Bot <hello@qmk.fm>2021-05-09 13:53:46 +0000
commitbfb052db1d81fd4be8a039f364e46ba1a3a72eec (patch)
treeb45563afce2413ba31b3fbee814e5f2880c90cf5 /lib
parenta0c95cb07e3b9874a7a92669ea2695825a436cfd (diff)
parentf544b60aaa60eea3349eb5fbbae8ba3fd3c1b755 (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'lib')
-rwxr-xr-xlib/python/qmk/cli/info.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/qmk/cli/info.py b/lib/python/qmk/cli/info.py
index 572b305cac..6115e8f87d 100755
--- a/lib/python/qmk/cli/info.py
+++ b/lib/python/qmk/cli/info.py
@@ -2,8 +2,8 @@
Compile an info.json for a particular keyboard and pretty-print it.
"""
+import sys
import json
-import platform
from milc import cli
@@ -15,7 +15,7 @@ from qmk.keymap import locate_keymap
from qmk.info import info_json
from qmk.path import is_keyboard
-platform_id = platform.platform().lower()
+UNICODE_SUPPORT = sys.stdout.encoding.lower().startswith('utf')
def show_keymap(kb_info_json, title_caps=True):
@@ -129,7 +129,7 @@ def print_text_output(kb_info_json):
@cli.argument('-l', '--layouts', action='store_true', help='Render the layouts.')
@cli.argument('-m', '--matrix', action='store_true', help='Render the layouts with matrix information.')
@cli.argument('-f', '--format', default='friendly', arg_only=True, help='Format to display the data in (friendly, text, json) (Default: friendly).')
-@cli.argument('--ascii', action='store_true', default='windows' in platform_id, help='Render layout box drawings in ASCII only.')
+@cli.argument('--ascii', action='store_true', default=not UNICODE_SUPPORT, help='Render layout box drawings in ASCII only.')
@cli.subcommand('Keyboard information.')
@automagic_keyboard
@automagic_keymap