in reply to Escaping Wide Characters
eval-ing the resulting string should be sufficient (\x{....} and \x.. is how you can specify characters in a literal double quoted string (where .. are hex numbers)).
Update: maybe I should add that, depending on security context (e.g. if someone malicious could have modified the string returned from nice_string() in the meantime), you might not want to blindly eval an arbitrary string... In that case, you could extract the \x{....} sequences etc. using a regex, and convert the chars individually back to unicode with pack("U", hex(...))
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escaping Wide Characters
by mobiusinversion (Beadle) on Mar 05, 2008 at 18:03 UTC | |
|
Re^2: Escaping Wide Characters
by Anonymous Monk on Mar 05, 2008 at 17:59 UTC | |
by almut (Canon) on Mar 05, 2008 at 18:10 UTC | |
by ikegami (Patriarch) on Mar 05, 2008 at 18:10 UTC |