diff options
author | Rickard Green <[email protected]> | 2013-01-10 12:47:46 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2013-01-16 17:16:52 +0100 |
commit | 0dd3b88cdf90283d9c276ee415f985cb764e522f (patch) | |
tree | 1584d76d9960339a03c04412ef7919473e7b2efc /erts/emulator/beam/global.h | |
parent | 5d79f55ca441727578d34b78ee0d6d8aa80976ee (diff) | |
download | otp-0dd3b88cdf90283d9c276ee415f985cb764e522f.tar.gz otp-0dd3b88cdf90283d9c276ee415f985cb764e522f.tar.bz2 otp-0dd3b88cdf90283d9c276ee415f985cb764e522f.zip |
UTF-8 support for distribution
Diffstat (limited to 'erts/emulator/beam/global.h')
-rwxr-xr-x | erts/emulator/beam/global.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/erts/emulator/beam/global.h b/erts/emulator/beam/global.h index 1500424d3e..eccdf10c75 100755 --- a/erts/emulator/beam/global.h +++ b/erts/emulator/beam/global.h @@ -1519,17 +1519,25 @@ Sint erts_native_filename_need(Eterm ioterm, int encoding); void erts_copy_utf8_to_utf16_little(byte *target, byte *bytes, int num_chars); int erts_analyze_utf8(byte *source, Uint size, byte **err_pos, Uint *num_chars, int *left); +int erts_analyze_utf8_x(byte *source, Uint size, + byte **err_pos, Uint *num_chars, int *left, + Sint *num_latin1_chars, Uint max_chars); 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 /* out */); Eterm erts_convert_native_to_filename(Process *p, byte *bytes); -int erts_utf8_to_latin1(byte* dest, const byte* source, unsigned slen); +Eterm erts_utf8_to_list(Process *p, Uint num, byte *bytes, Uint sz, Uint left, + Uint *num_built, Uint *num_eaten, Eterm tail); +int erts_utf8_is_latin1_string(const byte *string, int len); +int erts_utf8_to_latin1(byte* dest, const byte* source, int slen); +int erts_utf8_to_latin1_backwards(byte* dest, const byte* source, int slen); #define ERTS_UTF8_OK 0 #define ERTS_UTF8_INCOMPLETE 1 #define ERTS_UTF8_ERROR 2 #define ERTS_UTF8_ANALYZE_MORE 3 +#define ERTS_UTF8_OK_MAX_CHARS 4 /* erl_trace.c */ void erts_init_trace(void); |