[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to decode this unicode-hex string



Hi, 

When I select from non-English web sites and paste into my emacs,
sometimes I get a unicode-hex string like this: \u82f1\u6587, which was
"English" in Big5 encoding. 

I'm wondering how I can decode such strings and return the 8-bit character. 

So far I've been looking into the following Perl modules man pages an
tried each one of them: Unicode::UTF8simple, Unicode::String,
Unicode::Lite. None of them seems to be able to do that. They handle
unicode-hex strings like this: "U+00d6 U+00d0 U+00b9 U+00fa". The
difference between the above representation is that, the \u82f1 represent
one 8-bit character, while in Perl it is represented in two U+00xx values.

I had also played with tcl decodings, but wasn't successful. Please help. 

Thanks a lot!

tong





Reply to: