Thread ISO-8859-7 nach UCS2 wandeln (9 answers)
Opened by mawnet at 2008-06-19 15:40

mawnet
 2008-06-19 18:07
#111277 #111277
User since
2008-06-19
5 Artikel
BenutzerIn
[default_avatar]
Hier die Lösung:

Code (perl): (dl )
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>";


Scheinbar muss der Wert erst mit decode_utf8 in UTF8 umgewandelt werden.

View full thread ISO-8859-7 nach UCS2 wandeln