- or download this
#!/usr/bin/pe
1. my $smiley = "\xE2\x98\xBA";
2. print $smiley . "\n";
3. _utf8_on($smiley);
4. print $smiley . "\n";
- or download this
U+00E2 LATIN SMALL LETTER A WITH CIRCUMFLEX
U+0098 START OF STRING
U+00BA MASCULINE ORDINAL INDICATOR
- or download this
U+263A WHITE SMILING FACE
- or download this
# Explicit encode()
use Encode qw(encode);
...
# Set the filehandle to :utf8, a shortcut syntax because you need it s
+o often
binmode STDOUT, ":utf8";
print $smiley
- or download this
use utf8;
use Socket qw(inet_aton);
...
print $data_to_send;
# Oops, these characters don't exist in KOI8-R, so Perl used question
+marks. Heehee :)
- or download this
my Buf $byte_string;
my Str $text_string;