unescape a unicode escape sequence
Submitted by Friday, 4 February, 2005 - 16:27
on
Hi, I'm trying to convert unicode escape sequences to characters. Can someone recommend a good strategy for writing a macro ( or a BeanShell snippet for use in Search Replace dialog? )?
Basically I want to search for this pattern:
(\\u00[[:alnum:]][[:alnum:]]) which matches things like \u00E9
and I want to replace it with:
new Character( $1 ); where $1 is the match from the pattern search.
Is there a way to do this using SearchReplace? Or do I need to iterate through the lines of the current buffer and do replacements on each line?
Thanks for any tips. jEdit Rules my world!!
-Travis McCauley
Toronto
Basically I want to search for this pattern:
(\\u00[[:alnum:]][[:alnum:]]) which matches things like \u00E9
and I want to replace it with:
new Character( $1 ); where $1 is the match from the pattern search.
Is there a way to do this using SearchReplace? Or do I need to iterate through the lines of the current buffer and do replacements on each line?
Thanks for any tips. jEdit Rules my world!!
-Travis McCauley
Toronto