Unicode::Security - Unicode security mechanisms
use Unicode::Security qw( confusable restriction_level whole_script_confusable mixed_script_confusable mixed_script mixed_number ); $truth = confusable($string1, $string2); $truth = whole_script_confusable($script, $string); $truth = mixed_script_confusable($string); $truth = mixed_script($string); $truth = mixed_number($string); $level = restriction_level($string);
Implements the Unicode security mechanisms as described in the Unicode Technical Standard #39.
$truth = confusable($string1, $string2)
Returns true if the two strings are visually confusable.
$truth = whole_script_confusable($script, $string)
Returns true if the string is whole-script confusable within the given script. Returns undef if the string contains multiple scripts.
$truth = mixed_script_confusable($string)
Returns true if the string is mixed-script confusable.
$skel = skeleton($string)
The skeleton transform is used internally by the confusable algorithm. The result is not intended for display, storage or transmission. It should be thought of as an intermediate processing form, similar to a hashcode. The characters in the skeleton are not guaranteed to be identifier characters.
$level = restriction_level($string [, $non_id_regex])
Returns the restriction level (0-5) of the string. The default Identifier Profile matches against \P{ID_Continue}. If you want to use a different Identifier Profile, you can pass in an optional regular expression to test for non-identifier characters.
%soss = soss($string)
The set of Unicode character script names for a given string. Used internally by the restriction level algorithm.
$truth = mixed_script($string)
Returns true if the string contains mixed scripts.
$truth = mixed_number($string)
Returns true if the string is composed of characters from different decimal number systems.
http://www.unicode.org/reports/tr39/
Please report any bugs or feature requests to http://rt.cpan.org/Public/Bug/Report.html?Queue=Unicode-Security. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
You can find documentation for this module with the perldoc command.
perldoc Unicode::Security
You can also look for information at:
GitHub Source Repository
http://github.com/gray/unicode-security
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Unicode-Security
CPAN Ratings
http://cpanratings.perl.org/d/Unicode-Security
RT: CPAN's request tracker
http://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-Security
Search CPAN
http://search.cpan.org/dist/Unicode-Security/
Copyright (C) 2014-2015 gray <gray at cpan.org>, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
gray, <gray at cpan.org>
To install Unicode::Security, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Unicode::Security
CPAN shell
perl -MCPAN -e shell install Unicode::Security
For more information on module installation, please visit the detailed CPAN module installation guide.