Velocity: Escape unicode
What would be the best / most efficient way in velocity to automatically convert (ideally all or at least some) special characters to the equivalent unicode escape code, e.g.
Ä -> \u00c4,
ä -> \u00e4
Ö -> \u00d6
ö -> \u00f6
Ü -> \u00dc
ü -> \u00fc
ß -> \u00df
I haven't found some built-in function that can automatically convert these characters and a simple
$str.replace("ä", "\u00c4")
doesn't seem to work in some initial tests and would also mean that I have to replace each character separately (unless there is some way to replace multiple characters in one go).
@Sanford Whiteman maybe?
Many thanks,
Markus