const char *outString, int32_t outLength,
const UChar *localString, int32_t localLength);
+/**
+ * \def uprv_compareInvWithUChar
+ * Compare an invariant-character strings with a UChar string
+ * @internal
+ */
+#if U_CHARSET_FAMILY==U_ASCII_FAMILY
+# define uprv_compareInvWithUChar uprv_compareInvAscii
+#elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY
+# define uprv_compareInvWithUChar uprv_compareInvEbcdic
+#else
+# error Unknown charset family!
+#endif
+
+
/* material... -------------------------------------------------------------- */
#if 0
#include "umutex.h"
#include "uresimp.h"
#include "uvector.h"
+#include "udataswp.h" /* for InvChar functions */
static UHashtable* gLocExtKeyMap = NULL;
static icu::UInitOnce gLocExtKeyMapInitOnce = U_INITONCE_INITIALIZER;
break;
}
// check if this is an alias of canoncal legacy type
- if (uprv_compareInvAscii(NULL, legacyTypeId, -1, to, toLen) == 0) {
+ if (uprv_compareInvWithUChar(NULL, legacyTypeId, -1, to, toLen) == 0) {
const char* from = ures_getKey(typeAliasDataEntry.getAlias());
if (isTZ) {
// replace colon with slash if necessary
break;
}
// check if this is an alias of bcp type
- if (uprv_compareInvAscii(NULL, bcpTypeId, -1, to, toLen) == 0) {
+ if (uprv_compareInvWithUChar(NULL, bcpTypeId, -1, to, toLen) == 0) {
const char* from = ures_getKey(bcpTypeAliasDataEntry.getAlias());
uhash_put(typeDataMap, (void*)from, t, &sts);
}
UChar ubuf[kSizeUBuf];
int32_t ulen, uelen;
UErrorCode status = U_ZERO_ERROR;
-
- u_strFromUTF8(ubuf, kSizeUBuf, &ulen, locSkelItemPtr->skeleton, -1, &status);
+ ulen = u_unescape(locSkelItemPtr->skeleton, ubuf, kSizeUBuf);
udifmt = udtitvfmt_open(locSkelItemPtr->locale, ubuf, ulen, zoneGMT, -1, &status);
if ( U_FAILURE(status) ) {
log_data_err("FAIL: udtitvfmt_open for locale %s, skeleton %s: %s\n",
}
} else if (uprv_strcmp(legacyType, expected) != 0) {
log_data_err("toLegacyType: keyword=%s, value=%s => %s, expected=%s\n", keyword, value, legacyType, expected);
+ } else {
+ log_verbose("toLegacyType: keyword=%s, value=%s => %s\n", keyword, value, legacyType);
}
}
}