X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fi18n.h;h=4dbf61a29974469b9568779226f8bb30fb01c469;hb=14c065be90af77f2661d4bf4d35f3ec943fd99bd;hp=fc3a64935e4e903b4abf1dc3abe6861d46bd5b8b;hpb=fe8dc2171009e90d2335f159d05f7e6660e24780;p=pspp diff --git a/src/libpspp/i18n.h b/src/libpspp/i18n.h index fc3a64935e..4dbf61a299 100644 --- a/src/libpspp/i18n.h +++ b/src/libpspp/i18n.h @@ -1,5 +1,5 @@ /* PSPP - a program for statistical analysis. - Copyright (C) 2006, 2010, 2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2010, 2011, 2012 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 @@ -126,14 +126,34 @@ struct encoding_info used in ASCII text files has the same value in this encoding. */ bool is_ascii_compatible; + /* True if this encoding has a unit width of 1 byte and appears to be + EBCDIC-based. */ + bool is_ebcdic_compatible; + /* Character information. */ int unit; /* Unit width, in bytes. */ char cr[MAX_UNIT]; /* \r in encoding, 'unit' bytes long. */ char lf[MAX_UNIT]; /* \n in encoding, 'unit' bytes long. */ + char space[MAX_UNIT]; /* ' ' in encoding, 'unit' bytes long. */ }; bool get_encoding_info (struct encoding_info *, const char *name); 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); + +/* 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 */