-
-
05 Mar 2010 02:50:37 UTC
- Distribution: URI-Escape-JavaScript
- Module version: 0.04
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (2)
- Testers (373 / 130 / 0)
- Kwalitee
Bus factor: 1- 100.00% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity
24 month- Tools
- Download (16.62KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Koichi Taniguchi
- Dependencies
- Encode
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
URI::Escape::JavaScript - A perl implementation of JavaScript's escape() and unescape() functions
SYNOPSIS
use URI::Escape::JavaScript qw(escape unescape); $string = "\x{3084}\x{306f}\x{308a}\x{539f}\x{56e0}\x{306f} Yapp(ry"; $escaped = escape($string); $escaped = '%u30B5%u30D6%u30C6%u30AF%u5165%u308A%u305F%u3044%uFF01%uFF01'; $string = unescape($escaped); use URI::Escape::JavaScript; $string = "\x{30c9}\x{30f3}\x{5f15}\x{304d}\x{3057}\x{305f}"; $escaped = js_escape($string); $escaped = '%u3059%u305A%u304D%u308A%u3093%u305F%u308D%u3046'; $string = js_unescape($escaped);
DESCRIPTION
URI::Escape::JavaScript provides JavaScript's
escape()
andunescape()
functions. It works simplar to homonymous functions of JavaScript. URI::Escape doesn't work for escaping and unescaping JavaScript like Unicode URI-escape ("%uXXXX"
). But you can use this module to do those.FUNCTIONS
escape()
escape()
works to escape a string to JavaScript's URI-escaped string. The argument of this function must be a flagged UTF-8 string (a.k.a. Perl's internal form). This function is exportable (but will not be exported by default).use
it with arguments of function names if you want (It's for backward compatibility).unescape()
unescape()
works to unescape JavaScript's URI-escaped string to original string. It will return a flagged UTF-8 string (a.k.a. Perl's internal form). This function is also exportable (but will not be exported by default).use
it with arguments of function names if you want (It's also for backward compatibility).js_escape()
It's a synonym for
escape()
. This function will be exported on your namespace.js_unescape()
It's a synonym for
unescape()
. This function will be exported on your namespace.AUTHOR
Koichi Taniguchi <taniguchi@livedoor.jp>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Module Install Instructions
To install URI::Escape::JavaScript, copy and paste the appropriate command in to your terminal.
cpanm URI::Escape::JavaScript
perl -MCPAN -e shell install URI::Escape::JavaScript
For more information on module installation, please visit the detailed CPAN module installation guide.