X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=encoding.h;h=1a9e79c65c3da9ec2a7cad810e0fce93c0784706;hb=6ecd50de9c5c892d2df4fe0a10b671613c18d51d;hp=12473d241e902b38146bcfc15d61387ece001f23;hpb=2c487bf2ff728c4015b46788d11ac9eb2f41af54;p=gedcom-parse.git diff --git a/encoding.h b/encoding.h index 12473d2..1a9e79c 100644 --- a/encoding.h +++ b/encoding.h @@ -1,3 +1,15 @@ +/* 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$ */ + /* Basic file encoding */ #ifndef __ENCODING_H #define __ENCODING_H @@ -8,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);