Fix character encoding issues and garbled text problems
Help me fix character encoding issues in my application.
**Programming Language:** {{LANGUAGE}}
**Where the issue occurs:** {{LOCATION}}
**Code handling text:**
```{{LANGUAGE}}
{{CODE}}
```
**Original text:** {{ORIGINAL}}
**Garbled/incorrect output:** {{GARBLED}}
**Expected output:** {{EXPECTED}}
**Source encoding:** {{SOURCE_ENCODING}}
**Target encoding:** {{TARGET_ENCODING}}
**Database encoding:** {{DB_ENCODING}}
Please provide:
1. **Encoding Detection**: Identify the actual encoding
2. **Conversion Issue**: Pinpoint where encoding goes wrong
3. **Encoding Chain**: Trace encoding through the system
4. **Fixed Code**: Proper encoding handling code
5. **Database Setup**: Correct database encoding configuration
6. **HTTP Headers**: Proper Content-Type headers
7. **File Handling**: BOM and file encoding handling
8. **Prevention**: How to prevent encoding issuesOr press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{LANGUAGE][{LOCATION][{CODE][{ORIGINAL][{GARBLED][{EXPECTED][{SOURCE_ENCODING][{TARGET_ENCODING][{DB_ENCODING]