Merge pull request #139 from nextlevelbuilder/fix/windows-unicode
fix: Windows Unicode encoding error for emoji characters
This commit is contained in:
@@ -15,9 +15,17 @@ Persistence (Master + Overrides pattern):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
import io
|
||||||
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
||||||
from design_system import generate_design_system, persist_design_system
|
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):
|
def format_output(result):
|
||||||
"""Format results for Claude consumption (token-optimized)"""
|
"""Format results for Claude consumption (token-optimized)"""
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "uipro-cli",
|
"name": "uipro-cli",
|
||||||
"version": "2.2.2",
|
"version": "2.2.3",
|
||||||
"description": "CLI to install UI/UX Pro Max skill for AI coding assistants",
|
"description": "CLI to install UI/UX Pro Max skill for AI coding assistants",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -15,9 +15,17 @@ Persistence (Master + Overrides pattern):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
import io
|
||||||
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
from core import CSV_CONFIG, AVAILABLE_STACKS, MAX_RESULTS, search, search_stack
|
||||||
from design_system import generate_design_system, persist_design_system
|
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):
|
def format_output(result):
|
||||||
"""Format results for Claude consumption (token-optimized)"""
|
"""Format results for Claude consumption (token-optimized)"""
|
||||||
|
|||||||
Reference in New Issue
Block a user