UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 10: invalid start byte
Python read bytes that aren’t valid in the encoding it assumed (usually UTF-8).
codec can't decode byteinvalid start byteinvalid continuation byte Meaning
The file was saved in another encoding (Windows-1252/latin-1, UTF-16), or it’s binary. Byte 0x92 is a Windows “smart quote”; 0xff 0xfe at the start indicates UTF-16.
Common causes
- CSV exported from Excel in cp1252
- Reading a binary file in text mode
- UTF-16 file
- Default encoding differs on Windows
⚡ Quick fix
- Pass the right encoding: open(p, encoding="cp1252")
- Try encoding="utf-8-sig" for BOM files
- Use errors="replace" only when data loss is acceptable
- Open binaries with "rb"
Detailed fix by platform
Python
pd.read_csv("export.csv", encoding="cp1252")
How to diagnose
- Byte — Which byte value? (0x92/0x96 → cp1252, 0xff 0xfe → UTF-16)
- File — Text or binary?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Python
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026