aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_unicode.c
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2013-03-25 12:44:20 +0100
committerDan Gudmundsson <[email protected]>2013-06-03 12:46:47 +0200
commit75763bd57338b3efe8300ece094aacc8e1a7a467 (patch)
tree9ef4f74a15157183c67d5545085e453982ff46d4 /erts/emulator/beam/erl_unicode.c
parentc97ac1a34971ce60bd36519e7ea51db2456217df (diff)
downloadotp-75763bd57338b3efe8300ece094aacc8e1a7a467.tar.gz
otp-75763bd57338b3efe8300ece094aacc8e1a7a467.tar.bz2
otp-75763bd57338b3efe8300ece094aacc8e1a7a467.zip
erts: Change erlang:open_port spawn to handle unicode
Previously only 'spawn_executable' handled unicode input. Also change 'cd' option to always handle unicode. Update open_port documentation and tests
Diffstat (limited to 'erts/emulator/beam/erl_unicode.c')
-rw-r--r--erts/emulator/beam/erl_unicode.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_unicode.c b/erts/emulator/beam/erl_unicode.c
index ad6f8b993a..71794e1101 100644
--- a/erts/emulator/beam/erl_unicode.c
+++ b/erts/emulator/beam/erl_unicode.c
@@ -1981,9 +1981,19 @@ BIF_RETTYPE binary_to_existing_atom_2(BIF_ALIST_2)
* string routines, that will certainly fail on some OS.
*/
-char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_size, ErtsAlcType_t alloc_type, int allow_empty, int allow_atom, Sint *used)
+char *erts_convert_filename_to_native(Eterm name, char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, int allow_empty,
+ int allow_atom, Sint *used)
{
int encoding = erts_get_native_filename_encoding();
+ return erts_convert_filename_to_encoding(name, statbuf, statbuf_size, alloc_type,
+ allow_empty, allow_atom, encoding, used);
+}
+
+char *erts_convert_filename_to_encoding(Eterm name, char *statbuf, size_t statbuf_size,
+ ErtsAlcType_t alloc_type, int allow_empty,
+ int allow_atom, int encoding, Sint *used)
+{
char* name_buf = NULL;
if ((allow_atom && is_atom(name)) ||