Support use of non-ascii passwords.

[Closes #4001]
Merge remote-tracking branch 'ivan/bug/4001_support-non-ascii-passwords' into develop