I want to use a hexadecimal Unicode escape in the replacement string of a substitution command, i.e., with the example character U+20AC:
:s#something#\x{20AC}#g
The above example doesn't work, because it uses Perl syntax in the replacement string, but I want this to work in Vim, and I want it to work for many different other possible Unicode characters too, specified by their hexadecimal value (2 or 4 digits or possibly even more). Since this is a series of substitution statements that will be generated by a script, I would like the substitution statements itself to be ASCII-only, as that is easier to work with. I think there must be a proper syntax for this, but I just cannot find it. \%u20AC works in the search pattern, but not in the replacement string. As this is not done interactively, the CTRL-V + 4 hex digits method won't work.