in reply to How to Use Pack to Convert UTF-16 Surrogate Pairs to UTF-8?
The only *correct* way to decode things is to know the encoding that was given to your program, then use the Encode module. BTW, the Encode module is a core perl module, and not something you should try to avoid.
As a sidenote, I would use chr(hex $1) instead of pack("U", hex($1))
|
|---|