shihao zhong <zhong950419(at)gmail(dot)com> writes:
> Thanks for pushing the infrastructure. v8 does what you suggest,
> with one more restriction: it translates only when both encodings are
> UTF8.
Uh ... what?
> WIN1252 accepts byte 0x81 but has no character for it.
Surely your solution is shooting the messenger. If WIN1252 behaves
that way, we need to fix its validator, not insert arbitrary
restrictions elsewhere to work around the inadequate validation.
regards, tom lane