#!/usr/bin/env python3 """ Script to fix Unicode emoji characters in bot files for Windows compatibility """ import re def fix_unicode_in_file(filename): """Replace emoji characters with text equivalents""" # Read the file with open(filename, 'r', encoding='utf-8') as f: content = f.read() # Define emoji replacements replacements = { '🚀': '[STARTING]', 'âš™ī¸': '[CONFIG]', '🔐': '[LOGIN]', '✅': '[SUCCESS]', '❌': '[ERROR]', 'âš ī¸': '[WARNING]', 'đŸŽ¯': '[TARGET]', '👤': '[PROCESSING]', '📝': '[USER BIO]', '🤖': '[AI]', '📤': '[SENDING]', '📨': '[RECEIVED]', 'đŸ’Ŧ': '[MESSAGE]', 'âŗ': '[WAITING]', '🎉': '[COMPLETE]', '📊': '[STATS]', '🔍': '[SEARCHING]', '🧊': '[ICE BREAKER]', '🤖': '[AUTO RESPONDER]', '📋': '[MENU]', 'đŸŽ¯': '[SELECT]', 'âšī¸': '[STOP]', '👋': '[GOODBYE]', '🔧': '[INITIALIZING]', '⏰': '[SETTING UP]', '📈': '[PERFORMANCE]' } # Apply replacements for emoji, text in replacements.items(): content = content.replace(emoji, text) # Write back to file with open(filename, 'w', encoding='utf-8') as f: f.write(content) print(f"Fixed Unicode characters in {filename}") if __name__ == "__main__": # Fix both bot files fix_unicode_in_file("enhanced_icebreaker_bot.py") fix_unicode_in_file("enhanced_responder_bot.py") print("Unicode fixes completed!")