X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=encoding.h;h=1a9e79c65c3da9ec2a7cad810e0fce93c0784706;hb=471aa410dba0a5604cc40f4d23fc34efb098c778;hp=3e9af4361f1eca4601df432d9c90d4b8c0a48e8c;hpb=a54348309c92f4d7a2dd66b4055122a7be19ca28;p=gedcom-parse.git diff --git a/encoding.h b/encoding.h index 3e9af43..1a9e79c 100644 --- a/encoding.h +++ b/encoding.h @@ -1,3 +1,12 @@ +/* This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + + (C) 2001 by The Genes Development Team + Original author: Peter Verthez (Peter.Verthez@advalvas.be) +*/ + /* $Id$ */ /* $Name$ */ @@ -11,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);