diff options
author | Patrik Nyblom <[email protected]> | 2010-10-13 17:08:32 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-11-29 13:59:12 +0100 |
commit | 4cf08709189ea8b7e2ae20f85c390abd04ae48ae (patch) | |
tree | b9a1ee11e1672e03d8a80a0b8829bdaab75f66bf /erts/emulator/beam/erl_init.c | |
parent | 25e22145d129a80dcfc02c64dfe0b0d890a5e26d (diff) | |
download | otp-4cf08709189ea8b7e2ae20f85c390abd04ae48ae.tar.gz otp-4cf08709189ea8b7e2ae20f85c390abd04ae48ae.tar.bz2 otp-4cf08709189ea8b7e2ae20f85c390abd04ae48ae.zip |
Teach filename to accept raw data and add filename enc option to emu
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c index a7892e143b..464ee750f7 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -908,7 +908,27 @@ erl_start(int argc, char **argv) VERBOSE(DEBUG_SYSTEM, ("using display items %d\n",display_items)); break; - + case 'f': + if (!strncmp(argv[i],"-fn",3)) { + arg = get_arg(argv[i]+3, argv[i+1], &i); + switch (*arg) { + case 'u': + erts_set_user_requested_filename_encoding(ERL_FILENAME_UTF8); + break; + case 'l': + erts_set_user_requested_filename_encoding(ERL_FILENAME_LATIN1); + break; + case 'a': + erts_set_user_requested_filename_encoding(ERL_FILENAME_UNKNOWN); + default: + erts_fprintf(stderr, "bad filename encoding %s, can be (l,u or a)\n", arg); + erts_usage(); + } + break; + } else { + erts_fprintf(stderr, "%s unknown flag %s\n", argv[0], argv[i]); + erts_usage(); + } case 'l': display_loads++; break; |