Home GnuPG
Diffusion GnuPG bef68efd8da9

common,w32: Do not assume the ANSI codepage during string conversion.

Description

common,w32: Do not assume the ANSI codepage during string conversion.

* common/utf8conv.c (get_w32_codepage): New.
(wchar_to_native): Use instead oc CP_ACP.
(native_to_wchar): Ditto.

This should fix quite some issue; we fixed it when using the iconv
based machinery about 14 years ago. At some point we introduced the
new conversion functions because Windows started to support UTF-8
natively. The fix comes late but well, it is done.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Aug 21 2020, 2:42 PM
Parents
rG73b0fdabdb10: common: Strip trailing CR,LF from w32_strerror.
Branches
Unknown
Tags
Unknown