Skip to main content

Module unicode

Module unicode 

Source
Expand description

Unicode and HTML entity encoding strategies. Unicode and HTML entity encoding strategies.

Functions§

fullwidth_encode
Fullwidth Unicode encoding — replaces ASCII with fullwidth equivalents.
homoglyph_encode
Homoglyph substitution — replaces select ASCII characters with visually identical Unicode characters from other scripts.
html_entity_decimal_encode
HTML decimal entity encoding — each character becomes &#DD;.
html_entity_encode
HTML entity encoding — each character becomes &#xXX;.
iis_unicode_encode
IIS/ASP percent Unicode encoding — each character becomes %uXXXX.
json_string_encode
JSON string encoding — wraps the payload in a JSON string with proper escaping.
unicode_encode
Unicode encoding — each character becomes \uXXXX.