Skip to main content
PraisonAI automatically handles Windows legacy code pages to prevent CLI crashes and ensure ASCII-safe output.

Quick Start

1

Automatic Handling

PraisonAI ≥ v0.0.x automatically detects legacy Windows code pages and renders ASCII-safe output:
praisonai --help
No configuration needed - the CLI will work without crashes.
2

Enable Full UTF-8 (Optional)

For full emoji and box-drawing characters, manually enable UTF-8:
$env:PYTHONIOENCODING='utf-8'
chcp 65001
praisonai --help

How It Works

ComponentBehaviorFallback
Rich ConsoleDetects legacy code pageUses ASCII boxes, no emoji
PYTHONIOENCODINGSet to utf-8 for subprocess safetyPrevents child process crashes
Error HandlingCatches UnicodeEncodeErrorShows remediation hint

Configuration Options

The automatic encoding detection requires no configuration. However, you can override behavior:
MethodScopeWhen to Use
PYTHONIOENCODING=utf-8Current sessionTemporary fix for full Unicode
chcp 65001Current sessionEnable UTF-8 code page
System Environment VariablesPermanentSet PYTHONIOENCODING globally
Windows TerminalBest experienceUse modern terminal instead of CMD

Common Patterns

Problem: UnicodeEncodeError in Older Versions

Symptom:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2500' in position 0
Solution:
# Temporary fix
set PYTHONIOENCODING=utf-8
praisonai --help

# Or upgrade to latest version
pip install --upgrade praisonai

Pattern: Permanent UTF-8 Setup

For PowerShell users:
# Add to PowerShell profile
Add-Content $PROFILE '$env:PYTHONIOENCODING="utf-8"'
For CMD users:
# Set system environment variable
setx PYTHONIOENCODING utf-8

Pattern: Windows Terminal Integration

Use Windows Terminal instead of legacy CMD:
// Windows Terminal settings.json
{
  "profiles": {
    "defaults": {
      "font": {
        "face": "Cascadia Code"
      }
    }
  }
}

Best Practices

Windows Terminal provides full UTF-8 support and modern terminal features. Download from the Microsoft Store or install via winget install Microsoft.WindowsTerminal.
Instead of setting PYTHONIOENCODING in each session, add it to your system environment variables through System Properties → Environment Variables.
Windows Subsystem for Linux (WSL) provides a full Unix terminal experience without encoding issues. Install with wsl --install.
The automatic encoding detection was added in recent versions. Ensure you’re running the latest version with pip install --upgrade praisonai.

CLI Reference

Complete CLI command reference

Installation Guide

Getting started with PraisonAI