diff --git a/cli/assets/scripts/search.py b/cli/assets/scripts/search.py index 0d8a951..3981cd2 100644 --- a/cli/assets/scripts/search.py +++ b/cli/assets/scripts/search.py @@ -15,9 +15,17 @@ Persistence (Master + Overrides pattern): """ import argparse +import sys +import io from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack from design_system import generate_design_system, persist_design_system +# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default) +if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8': + sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') +if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8': + sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8') + def format_output(result): """Format results for Claude consumption (token-optimized)""" diff --git a/cli/package.json b/cli/package.json index 8f7d4fb..7a8aca3 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "uipro-cli", - "version": "2.2.2", + "version": "2.2.3", "description": "CLI to install UI/UX Pro Max skill for AI coding assistants", "type": "module", "bin": { diff --git a/src/ui-ux-pro-max/scripts/search.py b/src/ui-ux-pro-max/scripts/search.py index 0d8a951..3981cd2 100644 --- a/src/ui-ux-pro-max/scripts/search.py +++ b/src/ui-ux-pro-max/scripts/search.py @@ -15,9 +15,17 @@ Persistence (Master + Overrides pattern): """ import argparse +import sys +import io from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack from design_system import generate_design_system, persist_design_system +# Force UTF-8 for stdout/stderr to handle emojis on Windows (cp1252 default) +if sys.stdout.encoding and sys.stdout.encoding.lower() != 'utf-8': + sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') +if sys.stderr.encoding and sys.stderr.encoding.lower() != 'utf-8': + sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8') + def format_output(result): """Format results for Claude consumption (token-optimized)"""