Server IP : 103.119.228.120 / Your IP : 3.138.126.51 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/lib64/perl5/Net/IDN/ |
Upload File : |
package Net::IDN::Punycode; use 5.006; use strict; use utf8; use warnings; use Exporter; our $VERSION = "1.101"; $VERSION = eval $VERSION; our @ISA = qw(Exporter); our @EXPORT = (); our @EXPORT_OK = (); our %EXPORT_TAGS = ( 'all' => [ qw(encode_punycode decode_punycode) ], ); Exporter::export_ok_tags(keys %EXPORT_TAGS); our $_NO_XS; eval { die if $_NO_XS; require XSLoader; XSLoader::load('Net::IDN::Punycode'); }; if (!defined(&encode_punycode)) { require Net::IDN::Punycode::PP; Net::IDN::Punycode::PP->import(qw(:all)); } 1; __END__ =head1 NAME Net::IDN::Punycode - A Bootstring encoding of Unicode for IDNA (S<RFC 3492>) =head1 SYNOPSIS use Net::IDN::Punycode qw(:all); $punycode = encode_punycode($unicode); $unicode = decode_punycode($punycode); =head1 DESCRIPTION This module implements the Punycode encoding, and only the Punycode encoding. This module does not implement any other steps required for converting internationalised domain names (IDNs) to and from ASCII. In particular, it does not do any string preparation as specified by I<Nameprep>/I<IDNA2008>/I<PRECIS> and does not add nor remove the ACE prefix (C<xn-->). Thus, use L<Net::IDN::Encode> if you want to convert domain names. Punycode is an instance of a more general algorithm called Bootstring, which allows strings composed from a small set of "basic" code points to uniquely represent any string of code points drawn from a larger set. Punycode is Bootstring with particular parameter values appropriate for IDNA. =head1 WARNING You may be tempted to use this module directly and add/remove the ACE prefix (C<xn-->) in your code for performance reasons. Usually, this is not a good idea. If you convert domain labels (or other strings) without proper prepration, you may end up with an ASCII encoding that is not interoperable or even poses security issues due to spoofing. Even if you think that your domain names are valid and already mapped to the correct form, this may not be true. For example, some environments might automatically convert your perfectly valiad domain names to a different but equivalent Unicode normalisation form (e.g., NFD instead of NFC), which already breaks IDNA. =head1 FUNCTIONS No functions are exported by default. You can use the tag C<:all> or import them individually. The following functions are available: =over =item encode_punycode($input) Encodes C<$input> with Punycode and returns the result. This function will throw an exception on invalid/unencodable input. =item decode_punycode($input) Decodes C<$input> with Punycode and returns the result. This function will throw an exception on invalid input. =back =head1 AUTHORS Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt> (versions 0.01 to 0.02) Claus FE<auml>rber E<lt>CFAERBER@cpan.orgE<gt> (versions 1.000 and higher) =head1 LICENSE Copyright 2002-2004 Tatsuhiko Miyagawa E<lt>miyagawa@bulknews.netE<gt> Copyright 2007-2014 Claus FE<auml>rber E<lt>CFAERBER@cpan.orgE<gt> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO S<RFC 3492> (L<http://www.ietf.org/rfc/rfc3492.txt>), L<IETF::ACE>, L<Convert::RACE> =cut