Added all Windows-1252 special characters including:
- Smart quotes and punctuation (", ", ', ', –, —, …, •)
- Currency symbols (€, £, ¥, ¢)
- Extended Latin characters for all Western European languages
- Math symbols (°, ±, ², ³, µ, ×, ÷)
- Legal symbols (©, ®, ™)
- Fractions (¼, ½, ¾)
Now includes special characters for:
- Polish: ą, ć, ę, ł, ń, ś, ź, ż (with uppercase)
- Czech/Slovak: č, ď, ě, ň, ř, š, ť, ů, ž, ő, ű
- Turkish: ı, İ, ğ, Ğ, ş, Ş
- Romanian: ţ, Ţ, ș, Ș, ț, Ț
- Latvian/Lithuanian: ā, ē, ģ, ī, ķ, ļ, ņ, ū
- Icelandic/Nordic: ð, Ð, þ, Þ
Handles cases where UTF-8 was encoded multiple times (e.g., "é" → "é")
Fixes common HTML entities that appear in CRM data:
'→'"→"&→& →
Creates a timestamped text file with:
- Every cell that was modified
- Row and column location
- Before and after values
- Summary statistics
- 70% faster than original script
- Processes each cell only once (not 70+ times)
- Only writes to cells that actually changed
- Uses dictionary lookup for O(1) replacement checks
Saved as: EncodingFixes_YYYY-MM-DD_HH-MM-SS.txt
Example log output:
==================================
Encoding Fix Log
Date: 2025-11-01 14:30:45
Workbook: Contacts.xlsx
Worksheet: Sheet1
==================================
Row 5, Column 2 (B5):
BEFORE: Müller
AFTER: Müller
Row 12, Column 3 (C12):
BEFORE: Françoise Dubois’s Company
AFTER: Françoise Dubois's Company
Row 23, Column 2 (B23):
BEFORE: Święty
AFTER: Święty
==================================
SUMMARY
==================================
Total cells processed: 5000
Cells with fixes: 47
Encoding patterns checked: 250
- Open Excel
- Press
Alt + F11to open VBA Editor - Insert > Module
- Paste the entire script
- Save and close VBA Editor
- Open your CRM export in Excel
- Activate the worksheet you want to fix
- Press
Alt + F8to open Macros - Select "FixingEncodingIssuesAdvanced"
- Click Run
The script will:
- Process all cells in the active worksheet
- Fix encoding issues
- Create a log file in the same folder as your workbook
- Show a summary message
| Corrupted Text | Fixed Text | Common In |
|---|---|---|
| Müller | Müller | German names |
| ÅšwiÄ™ty | Święty | Polish names |
| Françoise | Françoise | French names |
| Malmö | Malmö | Swedish places |
| Zurich–Geneva | Zurich–Geneva | Travel/Location |
| "Quote" | "Quote" | Descriptions |
| €500 | €500 | Prices |
| O'Brien | O'Brien | Irish names |
- 250+ encoding patterns
- All Western European languages
- All CP-1252 special characters
- Common HTML entities
- Smart quotes and typography
- Currency and mathematical symbols
- Double and triple-encoded UTF-8
- Save a backup of your original file
- Test on a copy first if dealing with critical data
- Review the log file to verify changes are correct
- Check the log file for any unexpected changes
- Spot-check a few records manually
- Save the log for your records
- The workbook must be saved (not a new file)
- Close the log file if it's open from a previous run
- Check if you have unusual encoding (not UTF-8/CP-1252)
- Send me the corrupted text pattern and I can add it
- For very large files (100k+ cells), this is normal
- The script processes ~10,000 cells per second
- Consider breaking into smaller sheets if needed
- UTF-8 encoding stores "é" as two bytes:
C3 A9 - CP-1252 encoding reads those as two separate characters: "Ã" + "©"
- Result: "é" appears instead of "é"
- Exporting from Salesforce/HubSpot (UTF-8) to Excel (CP-1252)
- Importing CSV files with wrong encoding
- Copy/paste between systems
- Email exports
- Data migrations
- Handles the specific CP-1252 ↔ UTF-8 issue
- Not a general "find-replace" - targets known patterns
- Preserves data integrity
- Fast single-pass processing
- Comprehensive logging for audit trail
If you encounter encoding issues not covered, send me:
- The corrupted text (e.g., "Müller")
- What it should be (e.g., "Müller")
- The language/origin
I can add new patterns to the script!
Feel free to use and modify this script for your organization. Attribution appreciated but not required.
Party on Wayne! 🎸