#text #security #unicode

unicode-security

Detect possible security problems with Unicode usage according to Unicode Technical Standard #39 rules

6 releases

0.0.6 Dec 23, 2021
0.0.5 Jun 24, 2020
0.0.3 Apr 28, 2020
0.0.2 Jan 2, 2020

#164 in Text processing

Download history 6931/week @ 2021-09-29 7402/week @ 2021-10-06 6315/week @ 2021-10-13 7178/week @ 2021-10-20 7176/week @ 2021-10-27 7802/week @ 2021-11-03 8818/week @ 2021-11-10 7490/week @ 2021-11-17 7976/week @ 2021-11-24 6937/week @ 2021-12-01 7275/week @ 2021-12-08 6789/week @ 2021-12-15 5511/week @ 2021-12-22 6385/week @ 2021-12-29 6408/week @ 2022-01-05 5805/week @ 2022-01-12

25,234 downloads per month

MIT/Apache

445KB
5K SLoC

unicode-security

Build Status Current Version License: MIT/Apache-2.0

This crate exposes various utilities from UAX #39 Unicode Security Mechanisms


lib.rs:

Detect possible security problems with Unicode usage according to Unicode Technical Standard #39 rules.

extern crate unicode_security;

use unicode_security::GeneralSecurityProfile;

fn main() {
    let ch = 'µ'; // U+00B5 MICRO SIGN
    let allowed = 'µ'.identifier_allowed();
    println!("{}", ch);
    println!("The above char is {} in unicode identifiers.",
             if allowed { "allowed" } else { "restricted" });
}

features

unicode-security supports a no_std feature. This eliminates dependence on std, and instead uses equivalent functions from core.

crates.io

You can use this package in your project by adding the following to your Cargo.toml:

[dependencies]
unicode-security = "0.0.1"

Dependencies

~0.8–1.1MB
~39K SLoC

Wa