# UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

- **ID:** `python/django-query-parameter-encoding`
- **Domain:** python
- **Category:** encoding_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

Request parameter contains non-UTF-8 characters, often due to incorrect encoding in form submission.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Ensure HTML form has accept-charset='UTF-8' and server expects UTF-8.
   ```
2. **** (80% success)
   ```
   Use request.GET.get('param', '').encode('utf-8', errors='replace').decode('utf-8')
   ```

## Dead Ends

- **** — Changing request.encoding to 'latin-1' may work but breaks other Unicode characters. (50% fail)
- **** — Using .decode('utf-8', errors='ignore') hides data corruption. (60% fail)
