- or download this
chcp
Active code page: 1252
...
perl -e "print join ' ', map {sprintf '%02x', $_} unpack 'C*', chr 199
+"
c7
- or download this
perl -MEncode -e "print Encode::encode_utf8 chr 199"
Ç
perl -MEncode -e "print join ' ', map {sprintf '%02x', $_} unpack 'C*'
+, Encode::encode_utf8 chr 199"
c3 87
- or download this
perl -MEncode -e "print Encode::decode_utf8 \"\xc3\x87\""
Ç
- or download this
<?xml version="1.0" encoding="utf-8"?>
<root>Ç foo</root>
- or download this
use strict;
use warnings;
use feature 'say';
...
__DATA__
<empty/>
- or download this
perl sax_utf.pl utf8-1.xml
parser is XML::LibXML::SAX::Parser
file: utf8-1.xml
...
CUR = 6
LEN = 10
COW_REFCNT = 1
- or download this
sub characters {
use Encode;
my ($self, $data) = @_;
...
say "bytes for elt: ". $self->hexprint($content);
Dump($content);
}
- or download this
characters for elt: Ç foo
bytes for elt: C3 87 20 66 6F 6F
SV = PV(0x28ba328) at 0x236d2b8
...
CUR = 6
LEN = 10
COW_REFCNT = 1
- or download this
parser is XML::LibXML::SAX::Parser
file: utf8-2.xml
Wide character in say at sax_utf.pl line 36.
...
CUR = 10
LEN = 12
COW_REFCNT = 1
- or download this
parser is XML::LibXML::SAX::Parser
file: utf8-2.xml
characters for elt: Ç foo €
...
CUR = 10
LEN = 12
COW_REFCNT = 1