Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: How to print the actual bytes of UTF-8 characters ?

by ikegami (Pope)
on Feb 07, 2014 at 21:06 UTC ( #1073917=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    use utf8;                    # Source code is encoded using UTF-8.
    use open ':std', ':locale';  # Decode inputs and encode inputs.
       my @utf8 = unpack('C*', $utf8);
       push @chars, [ $char, $cp, $utf8, @utf8 ];
  2. or download this
    my $last = 0;
    for (@chars) {
    for my $i (3..$last) {
       say join '  ', map { defined($_->[$i]) ? sprintf '%08b', $_->[$i] :
    + (' 'x8) } @chars;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1073917]
[Discipulus]: why win must be SO complicated!?!? maybe i'll ask a SoPW
[Corion]: Discipulus: Windows isn't that complicated, at least if you look at it from the perspective of getting input via wndproc and answering to each message ;)
[Corion]: Of course, what you get put into your wndproc needs a lot of documentation ;))

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-01-17 09:59 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (154 votes). Check out past polls.