pub fn normalize_quotes(x: &str) -> StringExpand description
Normalises the many unicode apostrophe / single-quote variants to the ASCII apostrophe (’) and the unicode double-quote variants to the ASCII double quote (“). Author names and quoted/provisional names routinely arrive with curly, prime, modifier-letter, low-9, fullwidth or Windows-1252 quotes; collapsing them to ASCII keeps tokenisation and the parsed output consistent regardless of the input’s quote style.
Faithful port of Java UnicodeUtils.normalizeQuotes(String). Java’s null-in/null-out
case is not ported: this takes and returns non-nullable Rust types, so callers threading
an optional authorship string (e.g. Option<&str>) map over it instead
(authorship.map(normalize_quotes)), which reproduces the same null-forwarding at the
Option level.