10 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
###########################################################################################
sub urlEncode {
my ($string) = @_;
$string =~ s/(\W)/"%" . unpack("H2", $1)/ge;
#$string# =~ tr/.//;
return $string;
}
$isogreek = $cgi->param('greek');
$utf8 = decode("iso-8859-7", $isogreek);
$ucs2 = encode("UCS-2BE", $utf8);
$URLucs2 = urlEncode($ucs2);
print $URLucs2;
###########################################################################################
1 2 3 4 5 6 7 8 9
use CGI; my $cgi = new CGI; use URI::Escape; $isogreek = $cgi->param('greek'); $escaped = uri_escape( $isogreek ); print "Content-type: text/html\n\n"; print "$escaped <br>";
1 2 3 4 5 6 7 8 9 10 11 12 13
use CGI; use Encode; use URI::Escape; my $cgi = new CGI; $isogreek = $cgi->param('greek'); $isogreek = decode_utf8($isogreek); $ucs2 = encode("UCS-2BE", $isogreek); $escaped = uri_escape($ucs2); print "Content-type: text/html\n\n"; print "$escaped <br>";
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/perl use 5.010; use strict; use warnings; use HTML::Entities qw/decode_entities/; use Encode qw/encode/; use URI::Escape qw/uri_escape/; my $input = 'ε'; my $output = uri_escape(encode('UCS-2', decode_entities($input))); say $output;
10 Einträge, 1 Seite |