#unicode #unicode-text #text #unicode-technical-standard

unicode-security

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

9 releases

0.1.2 Sep 12, 2024
0.1.1 Feb 9, 2024
0.1.0 Sep 15, 2022
0.0.6 Dec 23, 2021
0.0.2 Jan 2, 2020

#168 in Security

Download history 91237/week @ 2025-09-23 102086/week @ 2025-09-30 99204/week @ 2025-10-07 79343/week @ 2025-10-14 84443/week @ 2025-10-21 88322/week @ 2025-10-28 80191/week @ 2025-11-04 61542/week @ 2025-11-11 80865/week @ 2025-11-18 87689/week @ 2025-11-25 86567/week @ 2025-12-02 89571/week @ 2025-12-09 85008/week @ 2025-12-16 40755/week @ 2025-12-23 41550/week @ 2025-12-30 56595/week @ 2026-01-06

241,701 downloads per month
Used in 139 crates (4 directly)

MIT/Apache

455KB
5K SLoC

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"

unicode-security

Build Status Current Version License: MIT/Apache-2.0

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

Dependencies

~1.5MB
~34K SLoC