diff options
author | Patrik Nyblom <[email protected]> | 2012-07-26 18:35:46 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-08-14 15:04:06 +0200 |
commit | e11bbb37273ebd2408d0c83c62770f9ef023879d (patch) | |
tree | 58ca0f2f6381e171c7c99ba3022a25c137f7b689 /erts/emulator/beam/io.c | |
parent | 0c9d90f314f364e5b1301ec89d762baabc57c7aa (diff) | |
download | otp-e11bbb37273ebd2408d0c83c62770f9ef023879d.tar.gz otp-e11bbb37273ebd2408d0c83c62770f9ef023879d.tar.bz2 otp-e11bbb37273ebd2408d0c83c62770f9ef023879d.zip |
Make get/putenv and erlexec understand Unicode
Putenv and getenv needs to convert to the proper environment
strings in Unicode depending on platform and user settings for filename
encoding. Also erlexec needs to pass environment strings in an appropriate
way for kernel to pick up. All environment strings on the command
line, as well as home directory, is now passed in UTF8 on windows
and in whatever encoding you have on Unix, kernel tries to convert all
parameters and environments from UTF8 before making strings.
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r-- | erts/emulator/beam/io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c index 204bff299e..35b194f927 100644 --- a/erts/emulator/beam/io.c +++ b/erts/emulator/beam/io.c @@ -1314,7 +1314,7 @@ void init_io(void) pdl_init(); - if (erts_sys_getenv("ERL_MAX_PORTS", maxports, &maxportssize) == 0) + if (erts_sys_getenv_raw("ERL_MAX_PORTS", maxports, &maxportssize) == 0) erts_max_ports = atoi(maxports); else erts_max_ports = sys_max_files(); @@ -5227,11 +5227,11 @@ int null_func(void) int erl_drv_putenv(char *key, char *value) { - return erts_write_env(key, value); + return erts_sys_putenv_raw(key, value); } int erl_drv_getenv(char *key, char *value, size_t *value_size) { - return erts_sys_getenv(key, value, value_size); + return erts_sys_getenv_raw(key, value, value_size); } |