Thread Beliebigen Codepoint umwandeln
(12 answers)
Opened by mustermann at 2007-09-10 17:37
Vom Codepoint zu UTF-8 und wieder zurück ;-)
Code (perl): (dl
)
1 2 3 4 5 6 use Encode; my $foo = Encode::encode( "UTF-8", "\x{306E}" ); print unpack( "H*", $foo ) . "\n"; Encode::from_to( $foo, "UTF-8", "UCS-2BE" ); print unpack( "H*", $foo ) . "\n"; $_=unpack"B*",~pack"H*",$_ and y&1|0& |#&&print"$_\n"for@.=qw BFA2F7C39139F45F78
0A28104594444504400 0A2F107D54447DE7800 0A2110453444450500 73CF1045138445F4800 0 F3EF2044E3D17DE 8A08A0451412411 F3CF207DF41C79E 820A20451412414 83E93C4513D17D2B |