> C and POSIX are perhaps the two most common locales and i may be wrong of > course but i thought they were VALID locales? I don't mean to suggest any > extra work for anyone, but at the very least the unit tests should report > the particular tests were unable to run. Most machines i have worked on > had the locale set to C. Do ALL the unit test really depend on the locale > not being C or am i misunderstanding something? >
Not all of them fail, just the tests of the Text module. We could maybe assume a default host encoding (utf-8?), a default language (en?) and a default country (uk? us?) when such a locale is found; and return the PDF_EBADLOCALE error/warning in pdf_text_init() so that the user of the library can issue the corresponding warning. I dont like the approach of defining a default encoding+language+country. If C|POSIX is a "valid" locale then it should be associated with some encoding (ASCII maybe?), isnt it? Regarding the language and the country, can we mark that fields as "undefined" or something like that?
