Use unpack with a template of U*, or split $str and use map with ord:
local $, = ' '; local $\ = "\n"; print unpack 'U*', $str; print map ord, split //, $str;
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
In reply to Re: String to UTF-8
by Juerd
in thread String to UTF-8
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |