Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1073917]
help
Chatterbox?
[erix]: hm, there's a FANN perl module - looks a bit old
[Cosmic37]: I'm afraid I don't know the answer to your map question...... what were the references too?
[corenth]: each reference was to a fairly small scaler.
[corenth]: I mean, array of scalers. usually triples.
[Cosmic37]: there is a FANN discussion group but seems to have gone quiet... http://leenissen. dk/fann/forum/ viewforum.php?f=18 &sid=1afc1fb3fa1a3 7f52b03e40d05cdaaa 3

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2018-02-20 18:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (274 votes). Check out past polls.

    Notices?