Characters that can alter visual order or create invisible ambiguity while remaining legal Unicode. Keep ordinary non-ASCII text readable.
(ch: char)
| 266 | /// Characters that can alter visual order or create invisible ambiguity while |
| 267 | /// remaining legal Unicode. Keep ordinary non-ASCII text readable. |
| 268 | fn is_invisible_format(ch: char) -> bool { |
| 269 | matches!( |
| 270 | ch, |
| 271 | '\u{00ad}' |
| 272 | | '\u{034f}' |
| 273 | | '\u{061c}' |
| 274 | | '\u{115f}'..='\u{1160}' |
| 275 | | '\u{17b4}'..='\u{17b5}' |
| 276 | | '\u{180b}'..='\u{180f}' |
| 277 | | '\u{200b}'..='\u{200f}' |
| 278 | | '\u{2028}'..='\u{202e}' |
| 279 | | '\u{2060}'..='\u{206f}' |
| 280 | | '\u{3164}' |
| 281 | | '\u{fe00}'..='\u{fe0f}' |
| 282 | | '\u{feff}' |
| 283 | | '\u{ffa0}' |
| 284 | | '\u{fff0}'..='\u{fffb}' |
| 285 | | '\u{1bca0}'..='\u{1bca3}' |
| 286 | | '\u{1d173}'..='\u{1d17a}' |
| 287 | | '\u{e0000}'..='\u{e0fff}' |
| 288 | ) |
| 289 | } |
| 290 | |
| 291 | /// Preserve the exact platform units of a non-UTF-8 argv entry. |
| 292 | #[cfg(unix)] |