/* PSPP - a program for statistical analysis.
- Copyright (C) 2006, 2010, 2011, 2012 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
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
const char *text, int length, struct pool *);
struct substring recode_substring_pool (const char *to, const char *from,
struct substring text, struct pool *);
+int recode_pedantically (const char *to, const char *from,
+ struct substring text, struct pool *,
+ struct substring *out);
size_t recode_string_len (const char *to, const char *from,
const char *text, int len);
bool set_encoding_from_locale (const char *loc);
const char *uc_name (ucs4_t uc, char buffer[16]);
+
+unsigned int utf8_hash_case_bytes (const char *, size_t n, unsigned int basis);
+unsigned int utf8_hash_case_string (const char *, unsigned int basis);
+int utf8_strcasecmp (const char *, const char *);
+int utf8_strncasecmp (const char *, size_t, const char *, size_t);
+char *utf8_to_upper (const char *);
+char *utf8_to_lower (const char *);
\f
/* Information about character encodings. */
bool is_encoding_supported (const char *encoding);
bool is_encoding_utf8 (const char *encoding);
+\f
+/* Database of encodings, by language or region. */
+
+struct encoding_category
+ {
+ const char *category; /* e.g. "Arabic" or "Western European". */
+ const char **encodings; /* Encodings within the category. */
+ size_t n_encodings; /* Number of encodings in category. */
+ };
+
+struct encoding_category *get_encoding_categories (void);
+size_t get_n_encoding_categories (void);
#endif /* i18n.h */