Closed sunfishcode closed 2 years ago
unicode-security's RestrictionLevelDetection seems to detect an ASCII "a" as SingleScript rather than ASCIIOnly.
RestrictionLevelDetection
SingleScript
ASCIIOnly
It also seems to detect a Cyrillic "а" as AsciiOnly rather than SingleScript.
AsciiOnly
Specifically, this program:
use unicode_security::restriction_level::RestrictionLevelDetection; fn main() { for string in &[ "\u{61}", "\u{430}", ] { println!("{} ({}): {:?}", string.escape_unicode(), string.escape_debug(), string.detect_restriction_level(), ); } }
Prints this:
\u{61} (a): SingleScript \u{430} (а): ASCIIOnly
huh, that's exceedingly strange
https://github.com/unicode-rs/unicode-security/pull/26
fortunately rustc doesn't rely on the distinction being drawn here
Published as 0.0.6
unicode-security's
RestrictionLevelDetection
seems to detect an ASCII "a" asSingleScript
rather thanASCIIOnly
.It also seems to detect a Cyrillic "а" as
AsciiOnly
rather thanSingleScript
.Specifically, this program:
Prints this: