Use uFFFD character as replacement for Unicode targets.

Fixes #856.
Remove unused code.
Remove passing tag for arbitrary-length replacement strings.