fix: Windows Unicode encoding error for emoji characters
Force UTF-8 encoding for stdout/stderr in search.py to handle emoji characters (⚡, ✓) on Windows systems that default to cp1252. Fixes UnicodeEncodeError: 'charmap' codec can't encode character - Bump CLI version to 2.2.3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)"""
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user