You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
csv: support non-ASCII Unicode dialect characters #8408
Add support for single non-ASCII Unicode code points in CSV dialect character attributes, matching CPython behavior.
Rationale
csv dialect options such as delimiter, quotechar, and escapechar accept exactly one Unicode character in CPython. RustPython currently stores these attributes as u8 in crates/stdlib/src/csv.rs, so valid one-character values outside the byte range (for example, €) are rejected.
Affected area
crates/stdlib/src/csv.rs
CSV dialect parsing, validation, reader, and writer configuration
Required changes
Replace the byte-only representation and parsing path for dialect characters with a representation that preserves a full Unicode code point, then propagate that support through the CSV reader and writer implementation. Keep existing validation that rejects empty and multi-character values, while reporting conversion/representation failures accurately.
Acceptance criteria
delimiter, quotechar, and escapechar accept a single non-ASCII Unicode code point such as €.
Empty and multi-character strings remain rejected according to CPython-compatible behavior.
Reader and writer behavior correctly handles the supported Unicode dialect characters.
Hi @doma17, are you still working on this? I'd be happy to pick it up if you're not, but I don't want to step on your toes. Feel free to let me know either way.
4. Hi @doma17, are you still working on this? I'd be happy to pick it up if you're not, but I don't want to step on your toes. Feel free to let me know either way.
Hi @deronnax. I haven't had much time to work on this recently, so feel free to take it over. Thanks for asking!
Activity
doma17 commentedon Aug 24, 2026
take
deronnax commentedon Oct 24, 2026
Hi @doma17, are you still working on this? I'd be happy to pick it up if you're not, but I don't want to step on your toes. Feel free to let me know either way.
doma17 commentedon Oct 25, 2026
Hi @deronnax. I haven't had much time to work on this recently, so feel free to take it over. Thanks for asking!
csv: support non-ASCII Unicode dialect characters (#9367)