/* Windows (including Visual Studio and MinGW but not Cygwin) */
#if defined(_WIN32) && !defined(__CYGWIN__)
#define strdup _strdup
-#define LOCALE_DE "deu"
+#define LOCALE_UTF8 NULL
#else
-#define LOCALE_DE "de_DE.UTF-8"
+#define LOCALE_UTF8 "de_DE.UTF-8"
#endif
/* Visual Studio */
/*
* Exercise the character-conversion logic, if we can.
*/
- if (NULL == setlocale(LC_ALL, LOCALE_DE)) {
+ if (NULL == LOCALE_UTF8 || NULL == setlocale(LC_ALL, LOCALE_UTF8)) {
skipping("Can't exercise charset-conversion logic without"
" a suitable locale.");
} else {
* de_DE.UTF-8 seems to be commonly supported.
*/
/* If it doesn't exist, just warn and return. */
- if (NULL == setlocale(LC_ALL, LOCALE_DE)) {
+ if (LOCALE_UTF8 == NULL
+ || NULL == setlocale(LC_ALL, LOCALE_UTF8)) {
skipping("invalid encoding tests require a suitable locale;"
- " %s not available on this system", LOCALE_DE);
+ " %s not available on this system", LOCALE_UTF8);
return;
}