wozdok has asked for the wisdom of the Perl Monks concerning the following question:
$text_a contains some Chinese GB2312 encoded string. What I wanna know is how to convert the hex style string like $text_b to the encoded literal string $text_a. I've heard it's hard to manipulate bytes and characters in perl. I badly need your help. Thanks a lot :)$text_a = "\xca\xc0\xbd\xe7\xc3\xb3\xd2\xd7\xd7\xe9\xd6\xaf\x0a"; print $text_a; $text_b = "cac0bde7c3b3d2d7d7e9d6af0a";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to convert hex string to real string ?
by jmcnamara (Monsignor) on Feb 17, 2003 at 09:29 UTC | |
|
Re: How to convert hex string to real string ?
by grantm (Parson) on Feb 17, 2003 at 09:29 UTC | |
|
Re: How to convert hex string to real string ?
by hardburn (Abbot) on Feb 17, 2003 at 15:05 UTC | |
|
Re: How to convert hex string to real string ?
by robartes (Priest) on Feb 17, 2003 at 09:30 UTC |