Probably a silly question, but better safe than sorry:
AFAICS there's no way for PQencryptPassword() to see what encodingapplies. Are we quite sure that that is not a problem? Or are passwordsASCII-only?
Jeroen