From 4bb5a0d957facb819893c42621bb17266e6f18a2 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 2 Dec 2001 09:25:57 +0000 Subject: [PATCH] Additional arguments to to_internal to specify output buffer explicitly. --- encoding.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/encoding.h b/encoding.h index f4a2129..1a9e79c 100644 --- a/encoding.h +++ b/encoding.h @@ -20,9 +20,14 @@ typedef enum _ENC { TWO_BYTE_LOHI = 2 } ENCODING; +/* All Unicode characters between U+0000 and U+FFFF can be encoded in + UTF-8 with 3 or less bytes */ +#define UTF_FACTOR 3 + int open_conv_to_internal(char* fromcode); void close_conv_to_internal(); -char* to_internal(char* str, size_t len); +char* to_internal(char* str, size_t len, + char* output_buffer, size_t out_len); void init_encodings(); void set_encoding_width(ENCODING enc); -- 2.30.2