aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/unicode.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-11-22 12:12:56 +0100
committerBjörn Gustavsson <[email protected]>2010-11-22 12:12:56 +0100
commit2e46e9dc0dbbba67780e08863b8605ffe567ced0 (patch)
tree29fbda805950584624c5e1051ebe5e9ea32cae80 /lib/stdlib/src/unicode.erl
parent0f2f7ddea021441d79abbfda1cb915fe755cb766 (diff)
parent67513294cd100042ba04e45a181253c29fead288 (diff)
downloadotp-2e46e9dc0dbbba67780e08863b8605ffe567ced0.tar.gz
otp-2e46e9dc0dbbba67780e08863b8605ffe567ced0.tar.bz2
otp-2e46e9dc0dbbba67780e08863b8605ffe567ced0.zip
Merge branch 'ks/file_open-mode' into dev
* ks/file_open-mode: Add the {encoding, _} options to file:open/2's modes
Diffstat (limited to 'lib/stdlib/src/unicode.erl')
-rw-r--r--lib/stdlib/src/unicode.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stdlib/src/unicode.erl b/lib/stdlib/src/unicode.erl
index 09b1deff9c..869505ba83 100644
--- a/lib/stdlib/src/unicode.erl
+++ b/lib/stdlib/src/unicode.erl
@@ -25,8 +25,17 @@
%% InEncoding is not {latin1 | unicode | utf8})
%%
--export([characters_to_list/1, characters_to_list_int/2, characters_to_binary/1,characters_to_binary_int/2, characters_to_binary/3,bom_to_encoding/1, encoding_to_bom/1]).
+-export([characters_to_list/1, characters_to_list_int/2,
+ characters_to_binary/1, characters_to_binary_int/2,
+ characters_to_binary/3,
+ bom_to_encoding/1, encoding_to_bom/1]).
+-export_type([encoding/0]).
+
+-type encoding() :: 'latin1' | 'unicode' | 'utf8'
+ | 'utf16' | {'utf16', endian()}
+ | 'utf32' | {'utf32', endian()}.
+-type endian() :: 'big' | 'little'.
characters_to_list(ML) ->
unicode:characters_to_list(ML,unicode).