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

- **ID:** `python/pandas-csv-unicode-decode`
- **Domain:** python
- **Category:** encoding_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pd.read_csv defaults to UTF-8, but the file is encoded in UTF-16 (BOM 0xFF 0xFE), Latin-1, or CP1252. 0xff at position 0 is the UTF-16 LE BOM.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   pd.read_csv(path, encoding='utf-16')  # or 'latin-1' / 'cp1252'
   ```
2. **** (90% success)
   ```
   Detect with `import chardet; enc = chardet.detect(open(path,'rb').read(10000))['encoding']`
   ```

## Dead Ends

- **** — Silently corrupts non-ASCII text (85% fail)
- **** — Same decode error on open() (90% fail)
