Seems to be the big-endian UTF-16 representation as plain hex:
#!/usr/bin/perl use Encode; # Perl char string (UTF-8) - i.e. your input # (this is the Russian word - literal UTF-8 chars wouldn't be displaye +d # correctly in PerlMonks <code> blocks - thus here as \x{....} ) my $str = "\x{0442}\x{0435}\x{0441}\x{0442}"; my $utf16 = encode("UTF-16be", $str); my $sms = unpack "H*", $utf16; print "$sms\n"; # "0442043504410442"
In reply to Re: UTF8 to UTF16, but...
by almut
in thread UTF8 to UTF16, but...
by natol44
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |