# UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)

- **ID:** `python/pip-unicode-decode-error-in-metadata`
- **Domain:** python
- **Category:** encoding_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A package's metadata file (e.g., PKG-INFO, setup.py) contains non-ASCII characters without proper encoding declaration. pip's metadata parser defaults to ASCII in some environments.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **** (75% success)
   ```
   Download the package source, edit the metadata file to add an encoding declaration (e.g., # -*- coding: utf-8 -*-), and install locally.
   ```
2. **** (70% success)
   ```
   Report the issue to the package maintainer; meanwhile, try installing an older version that may not have the problematic characters.
   ```

## Dead Ends

- **** — Affects I/O encoding, not the encoding used when reading package files. (80% fail)
- **** — The issue is in the package's metadata, not pip. (90% fail)
