my $uni = decode("Windows-1252", $input); $uni =~ s/(.)/sprintf "\\u%04X", ord $1/ge; print $uni, "\n";
If you only want to change certain characters, change the . part to match only what you want to change to \u encoding.
In reply to Re: Convert Windows-1252 Characters to Java Unicode Notation
by Juerd
in thread Convert Windows-1252 Characters to Java Unicode Notation
by Jim
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |