Subject: | Add notes comparing hexed bytes and hexed Unicode |
multivac:~ dmuey$ perl -le 'no utf8;print unpack("H*", "I ♥ Perl");'
4920e299a5205065726c
multivac:~ dmuey$ perl -le 'use utf8;print unpack("H*", "I ♥ Perl");'
492065205065726c
multivac:~ dmuey$ perl -le 'no utf8;print pack("H*", "4920e299a5205065726c");'
I ♥ Perl
multivac:~ dmuey$ perl -le 'use utf8;print pack("H*", "4920e299a5205065726c");'
I ♥ Perl
multivac:~ dmuey$ perl -le 'use utf8;print pack("H*", "492065205065726c");'
I e Perl
multivac:~ dmuey$ perl -le 'no utf8;print pack("H*", "492065205065726c");'
I e Perl
multivac:~ dmuey$
e.g.
Devel::Kit does what you mean regardless of the type:
pkit -le 'no utf8;xe("I ♥ Perl",1);'
pkit -le 'use utf8;xe("I ♥ Perl",1);'