in reply to Re: UCS2/HexEncoded
in thread UCS2/HexEncoded
Hi, what if a char is greater than FF (i.e. unicode), than shouldn't it be 0100, 0101, etc? In that case you would need to make the following change to L~R's code:
print UCS2( 'Hello' ); sub UCS2 { return join '', map { sprintf("%02X",ord) } split //, $_[0] + }
The only change is in the sprintf format.
Ted Young
($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: UCS2/HexEncoded
by Limbic~Region (Chancellor) on Feb 17, 2005 at 20:42 UTC |