Mercurial > octave
diff liboctave/system/oct-env.cc @ 25916:3f2282954600
Support non-ASCII characters in environment variables on Windows (bug #53922).
* lo-sysdep.[cc/h] (octave::sys::getenv_wrapper, octave::sys::putenv_wrapper):
Add new functions to call Unicode versions of CRT functions on Windows.
* oct-env.cc (putenv, do_getenv), sysdep.cc (Funsetenv): Use these new
functions.
* lo-utils.[cc/h] (octave_putenv): Remove function moved to lo-sysdep.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 04 Oct 2018 19:08:42 +0200 |
parents | 6652d3823428 |
children | 0249ba4c9589 00f796120a6d |
line wrap: on
line diff
--- a/liboctave/system/oct-env.cc Wed Oct 03 21:30:19 2018 +0200 +++ b/liboctave/system/oct-env.cc Thu Oct 04 19:08:42 2018 +0200 @@ -241,7 +241,7 @@ void env::putenv (const std::string& name, const std::string& value) { - octave_putenv (name, value); + putenv_wrapper (name, value); } bool @@ -531,9 +531,7 @@ std::string env::do_getenv (const std::string& name) const { - char *value = ::getenv (name.c_str ()); - - return value ? value : ""; + return getenv_wrapper (name); } // Do the work of changing to the directory NEWDIR.