Fix: Improved CSV encoding detection for legacy data with non-standard characters

- Changed encoding fallback order to prioritize iso-8859-1/latin-1 over cp1252
- Increased encoding test from 1KB to 10KB to catch issues deeper in files
- Added proper file handle cleanup on encoding failures
- Resolves 'charmap codec can't decode byte 0x9d' error in rolodex import
- Tested with rolodex file containing 52,100 rows successfully
This commit is contained in:
HotSwapp
2025-10-12 19:19:25 -05:00
parent f4c5b9019b
commit 7958556613
16 changed files with 438 additions and 8 deletions

View File

@@ -66,8 +66,9 @@ These tables contain lookup data used by other tables.
1. Scroll to the **File Upload** section
2. Click "Select CSV Files" and choose your CSV files
3. You can upload multiple files at once
4. Click "Upload Files"
5. Review the upload results to ensure files were recognized correctly
4. Choose whether to enable "Auto-import after upload" (default ON). When enabled, the system will import the uploaded files immediately following the Import Order Guide and will stop after the first file that reports any row errors.
5. Click "Upload Files"
6. Review the upload and auto-import results to ensure files were recognized and processed correctly
### 3. Import Reference Tables First
@@ -307,3 +308,5 @@ Contains sync functions that:
- **Legacy Models**: Preserve original Paradox schema (Rolodex, LegacyPhone, LegacyFile, Ledger, etc.)
- **Modern Models**: Simplified application schema (Client, Phone, Case, Transaction, Payment, Document)

View File

@@ -361,3 +361,5 @@ The implementation follows best practices:
Total implementation: ~3,000 lines of production-quality code supporting 27+ table types across 35 functions.