X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=src%2Fcharset.h;fp=src%2Fcharset.h;h=0a182951b6b7f61366cae07689978e9269d0339a;hb=13c37314da325b696a8aca3ffce36b144a5559d1;hp=0000000000000000000000000000000000000000;hpb=e143910b1b01296ce7524d03be8d10dcd519add5;p=projects%2Fchimara%2Fchimara.git diff --git a/src/charset.h b/src/charset.h new file mode 100644 index 0000000..0a18295 --- /dev/null +++ b/src/charset.h @@ -0,0 +1,18 @@ +#ifndef CHARSET_H +#define CHARSET_H + +#include + +#define PLACEHOLDER '?' +#define PLACEHOLDER_STRING "?" +/* Our placeholder character is '?'; other options are possible, like printing "0x7F" or something */ + +gchar *convert_latin1_to_utf8(const gchar *s, const gsize len); +gchar *convert_latin1_to_ucs4be_string(const gchar *s, const gsize len); +gchar *convert_utf8_to_latin1(const gchar *s, gsize *bytes_written); +gunichar *convert_utf8_to_ucs4(const gchar *s, glong *items_written); +gchar *convert_ucs4_to_utf8(const gunichar *buf, const glong len); +gchar *convert_ucs4_to_latin1_binary(const gunichar *buf, const glong len); +gchar *convert_ucs4_to_ucs4be_string(const gunichar *buf, const glong len); + +#endif /* CHARSET_H */