Skip to content

Instantly share code, notes, and snippets.

View oubihis's full-sized avatar
🎯
Focusing

S. oubihis

🎯
Focusing
View GitHub Profile
@oubihis
oubihis / script.py
Created March 14, 2024 10:32
Python Script for Character Encoding Repair in SQL Files
import re
class EncodingRepairer:
REPLACEMENTS = {
"€": "€", "‚": "‚", "„": "„", "…": "…", "ˆ": "ˆ",
"‹": "‹", "‘": "‘", "’": "’", "“": "“", "â€": "”",
"•": "•", "–": "–", "—": "—", "Ëœ": "˜", "â„¢": "™",
"›": "›", "Å“": "œ", "Å’": "Œ", "ž": "ž", "Ÿ": "Ÿ",
"Å¡": "š", "Ž": "Ž", "¡": "¡", "¢": "¢", "£": "£",
"¤": "¤", "Â¥": "¥", "¦": "¦", "§": "§", "¨": "¨",