diff options
author | Siri Hansen <[email protected]> | 2013-01-15 10:48:04 +0100 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2013-01-25 15:55:40 +0100 |
commit | 1f3ce8d2b9c07bee672efec9d6e3512633ffcf23 (patch) | |
tree | 2098fbde396dd47c635340737882e62cc9963300 /lib/common_test | |
parent | ed2be3f6913559b8d9ffd65609b7a2ca32367c05 (diff) | |
download | otp-1f3ce8d2b9c07bee672efec9d6e3512633ffcf23.tar.gz otp-1f3ce8d2b9c07bee672efec9d6e3512633ffcf23.tar.bz2 otp-1f3ce8d2b9c07bee672efec9d6e3512633ffcf23.zip |
Make arguments given with -s option to erl aware of file name encoding
OTP-10702
Arguments to functions started with the -s option to erl were
converted to atoms with list_to_atom(binary_to_list(Bin)) and thus
were always seen as latin1 encoded.
For other arguments to erl the conversion (to string) would take into
account the file name translation mode (set with +fnl, +fnu or +fna
switch to erl) and try to convert using
unicode:characters_to_list/2. The reason behind this is that it must
be possible to give paths and filenames on the command line and get
the expected encoding.
With the same reasoning, this commit changes the behaviour for
arguments to functions started with the -s option to also take
into account the file name translation mode. The arguments are now
converted to atoms by
list_to_atom(unicode:characters_to_list(Bin,file:native_name_encoding())
Diffstat (limited to 'lib/common_test')
0 files changed, 0 insertions, 0 deletions