Lines Matching defs:coll
50 static char* U_EXPORT2 ucol_sortKeyToString(const UCollator *coll, const uint8_t *sortkey, char *buffer, uint32_t *len) {
62 while(strength <= UCOL_QUATERNARY && strength <= ucol_getAttribute(coll,UCOL_STRENGTH, &error_code)) {
73 if(ucol_getAttribute(coll,UCOL_CASE_LEVEL, &error_code) == UCOL_ON && strength == UCOL_SECONDARY && doneCase == FALSE) {
75 } else if(ucol_getAttribute(coll,UCOL_CASE_LEVEL, &error_code) == UCOL_OFF || doneCase == TRUE || strength != UCOL_SECONDARY) {
82 if(strength == UCOL_QUATERNARY && ucol_getAttribute(coll,UCOL_ALTERNATE_HANDLING, &error_code) == UCOL_NON_IGNORABLE) {
87 if(ucol_getAttribute(coll,UCOL_STRENGTH, &error_code) == UCOL_IDENTICAL) {
151 UCollator *coll = ucol_open(NULL, &status);
171 if (coll == NULL) {
177 ucol_setAttribute(coll, currAttr, UCOL_DEFAULT, &status);
182 value = ucol_getAttribute(coll, currAttr, &status);
188 ucol_setAttribute(coll, currAttr, attrs[i].val[j], &status);
195 ucol_setAttribute(coll, currAttr, attrs[i].nonValue, &status);
202 ucol_setAttribute(coll, currAttr, value, &status);
209 value = ucol_getAttribute(coll, UCOL_ATTRIBUTE_COUNT, &status);
214 ucol_setAttribute(coll, UCOL_ATTRIBUTE_COUNT, UCOL_DEFAULT, &status);
219 ucol_close(coll);
235 UCollator *coll=NULL;
247 coll = ucol_openRules(defaultRulesArray, size, UCOL_ON, UCOL_PRIMARY, &status);
248 if(U_SUCCESS(status) && coll !=NULL) {
249 binColData = (uint8_t*)ucol_cloneRuleData(coll, &len1, &status);
281 ucol_close(coll);
1412 UCollator *coll = NULL;
1432 coll = ucol_open(testStruct[i].requestedLocale, &status);
1435 ucol_close(coll);
1438 locale = ucol_getLocaleByType(coll, ULOC_REQUESTED_LOCALE, &status);
1440 log_err("[Coll %s]: Error in requested locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].requestedLocale, locale);
1442 locale = ucol_getLocaleByType(coll, ULOC_VALID_LOCALE, &status);
1444 log_err("[Coll %s]: Error in valid locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].validLocale, locale);
1446 locale = ucol_getLocaleByType(coll, ULOC_ACTUAL_LOCALE, &status);
1448 log_err("[Coll %s]: Error in actual locale, expected %s, got %s\n", testStruct[i].requestedLocale, testStruct[i].actualLocale, locale);
1450 ucol_close(coll);
1456 coll = ucol_open("blahaha", &status);
1458 if(strcmp(ucol_getLocaleByType(coll, ULOC_REQUESTED_LOCALE, &status), "blahaha")) {
1461 if(strcmp(ucol_getLocaleByType(coll, ULOC_VALID_LOCALE, &status),
1466 if(strcmp(ucol_getLocaleByType(coll, ULOC_ACTUAL_LOCALE, &status),
1471 ucol_close(coll);
1481 coll = ucol_openRules(rlz, rlzLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
1482 locale = ucol_getLocaleByType(coll, ULOC_REQUESTED_LOCALE, &status);
1486 locale = ucol_getLocaleByType(coll, ULOC_VALID_LOCALE, &status);
1490 locale = ucol_getLocaleByType(coll, ULOC_ACTUAL_LOCALE, &status);
1494 ucol_close(coll);
1529 UCollator *coll = ucol_open("sh", &status);
1611 if(U_SUCCESS(status) && coll) {
1614 skSize = ucol_getSortKey(coll, buffer, buffSize, tests[i].key, 512);
1660 skSize = ucol_getSortKey(coll, buffer, buffSize, sortkey, 512);
1665 skSize = ucol_getSortKey(coll, buffer, buffSize, sortkey, 512);
1674 ucol_close(coll);
1681 static void doOverrunTest(UCollator *coll, const UChar *uString, int32_t strLen) {
1687 skLen = ucol_getSortKey(coll
1691 skLen2 = ucol_getSortKey(coll, uString, strLen, sortKey, i);
1713 UCollator *coll = ucol_open("root", &status);
1718 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
1719 doOverrunTest(coll, uString, strLen);
1722 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
1723 doOverrunTest(coll, uString, strLen);
1726 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &status);
1727 doOverrunTest(coll, uString, strLen);
1730 ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_ON, &status);
1731 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &status);
1732 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &status);
1733 doOverrunTest(coll, uString, strLen);
1736 ucol_close(coll);
1742 UCollator *coll = ucol_open(NULL, &error);
1749 ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_OFF, &error);
1750 if (ucol_getAttribute(coll, UCOL_FRENCH_COLLATION, &error) != UCOL_OFF ||
1755 ucol_setAttribute(coll, UCOL_FRENCH_COLLATION, UCOL_ON, &error);
1756 if (ucol_getAttribute(coll, UCOL_FRENCH_COLLATION, &error) != UCOL_ON ||
1761 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &error);
1762 if (ucol_getAttribute(coll, UCOL_ALTERNATE_HANDLING, &error) != UCOL_SHIFTED ||
1767 ucol_setAttribute(coll, UCOL_ALTERNATE_HANDLING, UCOL_NON_IGNORABLE, &error);
1768 if (ucol_getAttribute(coll, UCOL_ALTERNATE_HANDLING, &error) != UCOL_NON_IGNORABLE ||
1773 ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_LOWER_FIRST, &error);
1774 if (ucol_getAttribute(coll, UCOL_CASE_FIRST, &error) != UCOL_LOWER_FIRST ||
1779 ucol_setAttribute(coll, UCOL_CASE_FIRST, UCOL_UPPER_FIRST, &error);
1780 if (ucol_getAttribute(coll, UCOL_CASE_FIRST, &error) != UCOL_UPPER_FIRST ||
1785 ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_ON, &error);
1786 if (ucol_getAttribute(coll, UCOL_CASE_LEVEL, &error) != UCOL_ON ||
1791 ucol_setAttribute(coll, UCOL_CASE_LEVEL, UCOL_OFF, &error);
1792 if (ucol_getAttribute(coll, UCOL_CASE_LEVEL, &error) != UCOL_OFF ||
1797 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_ON, &error);
1798 if (ucol_getAttribute(coll, UCOL_NORMALIZATION_MODE, &error) != UCOL_ON ||
1803 ucol_setAttribute(coll, UCOL_NORMALIZATION_MODE, UCOL_OFF, &error);
1804 if (ucol_getAttribute(coll, UCOL_NORMALIZATION_MODE, &error) != UCOL_OFF ||
1809 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_PRIMARY, &error);
1810 if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_PRIMARY ||
1815 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_SECONDARY, &error);
1816 if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_SECONDARY ||
1821 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_TERTIARY, &error);
1822 if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_TERTIARY ||
1827 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_QUATERNARY, &error);
1828 if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_QUATERNARY ||
1833 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_IDENTICAL, &error);
1834 if (ucol_getAttribute(coll, UCOL_STRENGTH, &error) != UCOL_IDENTICAL ||
1839 ucol_close(coll);
1856 UCollator *coll = NULL;
1863 coll = ucol_openRules(buff, buffLen, UCOL_DEFAULT, UCOL_DEFAULT, &pError, &status);
1865 set = ucol_getTailoredSet(coll, &status);
1879 ucol_close(coll);
1898 UCollator *coll = ucol_open("en", &status);
1932 prefixKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, prefixKey, 256);
1935 suffixKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, suffixKey, 256);
1941 ucol_setAttribute(coll, UCOL_STRENGTH, strength, &status);
1944 sortKeysLen[i] = ucol_getSortKey(coll, buffer, unescapedLen, sortkeys[i], 256);
1951 ucol_sortKeyToString(coll, mergedPrefixkeys[i-1], outBuff1, &l1),
1952 ucol_sortKeyToString(coll, mergedPrefixkeys[i], outBuff2, &l2));
1957 ucol_sortKeyToString(coll, mergedSuffixkeys[i-1], outBuff1, &l1),
1958 ucol_sortKeyToString(coll, mergedSuffixkeys[i], outBuff2, &l2));
1985 emptyKeyLen = ucol_getSortKey(coll, &empty, 0, emptyKey, 20);
1987 abcKeyLen = ucol_getSortKey(coll, buffer, unescapedLen, abcKey, 50);
2013 ucol_close(coll);
2050 UCollator *coll = NULL, *fromNormalized = NULL;
2065 coll = ucol_openFromShortString(testCases[i].input, FALSE, &parseError, &status);
2073 ucol_getShortDefinitionString(coll, locale, fromShortBuffer, 256, &status);
2090 if(!ucol_equals(coll, fromNormalized)) {
2096 ucol_close(coll);
2189 UCollator *coll = NULL;
2201 coll = ucol_open(tests[i].locale, &status);
2202 if (coll == NULL || U_FAILURE(status)) {
2206 ucol_getContractionsAndExpansions(coll, conts, exp, TRUE, &status);
2224 noConts = ucol_getUnsafeSet(coll, conts, &status);
2234 ucol_close(coll);
2260 UCollator *coll = ucol_openRules(uRules, uRulesLen, UCOL_DEFAULT, UCOL_DEFAULT, NULL, &status);
2270 if((coll==NULL)||(U_FAILURE(status))) {
2281 imageSize = ucol_cloneBinary(coll, image, imageBufferCapacity, &status);
2285 imageSize = ucol_cloneBinary(coll, imageBuffer, imageSize, &status);
2292 genericOrderingTest(coll, wUCA, sizeof(wUCA)/sizeof(wUCA[0]));
2300 ucol_close(coll);
2309 UCollator *coll = ucol_open("es@collation=pinyin", &status);
2310 if (coll == NULL || status == U_FILE_ACCESS_ERROR) {
2318 ucol_close(coll);
2334 UCollator *coll = ucol_open(loc, &status);
2343 ucol_close(coll);