i18n: Factor out encoding categories from GUI into common code.
[pspp] / src / libpspp / i18n.h
index 383ff12da53ab6437ede88f815292f4ad2aa86ab..4dbf61a29974469b9568779226f8bb30fb01c469 100644 (file)
@@ -142,4 +142,18 @@ bool is_encoding_ascii_compatible (const char *encoding);
 bool is_encoding_ebcdic_compatible (const char *encoding);
 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 */