diff options
author | Andy Polyakov <appro@openssl.org> | 2016-07-16 23:21:39 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-08-01 09:52:06 +0200 |
commit | 4e155ec47e73ed95e15b9e875b3c7fdfcbf13496 (patch) | |
tree | 6bb90438ff29475903db0c9df1c1ef7c714b1993 /apps/openssl.c | |
parent | e72769aa41c3f49e0f39f44de222fc5ac339e3e0 (diff) | |
download | openssl-4e155ec47e73ed95e15b9e875b3c7fdfcbf13496.tar.gz |
apps/openssl.c: UTF-y Windows argv.
Windows never composes UTF-8 strings as result of user interaction
such as passing command-line argument. The only way to compose one
is programmatic conversion from WCHAR string, which in turn can be
picked up on command line.
[For reference, why not wmain, it's not an option on MinGW.]
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/openssl.c')
-rw-r--r-- | apps/openssl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/openssl.c b/apps/openssl.c index 78ed023fd4..0f7176fd72 100644 --- a/apps/openssl.c +++ b/apps/openssl.c @@ -131,6 +131,11 @@ int main(int argc, char *argv[]) #if defined(OPENSSL_SYS_VMS) && defined(__DECC) copied_argv = argv = copy_argv(&argc, argv); +#elif defined(_WIN32) + /* + * Replace argv[] with UTF-8 encoded strings. + */ + win32_utf8argv(&argc, &argv); #endif p = getenv("OPENSSL_DEBUG_MEMORY"); |