collator_unicode.cxx (449ab281) collator_unicode.cxx (a8f4084d)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 110 unchanged lines hidden (view full) ---

119 if (! U_SUCCESS(status)) throw RuntimeException();
120 }
121 }
122 }
123 if (!collator) {
124 /** ICU collators are loaded using a locale only.
125 ICU uses Variant as collation algorithm name (like de__PHONEBOOK
126 locale), note the empty territory (Country) designator in this special
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 110 unchanged lines hidden (view full) ---

119 if (! U_SUCCESS(status)) throw RuntimeException();
120 }
121 }
122 }
123 if (!collator) {
124 /** ICU collators are loaded using a locale only.
125 ICU uses Variant as collation algorithm name (like de__PHONEBOOK
126 locale), note the empty territory (Country) designator in this special
127 case here. The icu::Locale contructor changes the algorithm name to
127 case here. The icu::Locale constructor changes the algorithm name to
128 uppercase itself, so we don't have to bother with that.
129 */
130 icu::Locale icuLocale(
131 OUStringToOString(rLocale.Language, RTL_TEXTENCODING_ASCII_US).getStr(),
132 OUStringToOString(rLocale.Country, RTL_TEXTENCODING_ASCII_US).getStr(),
133 OUStringToOString(rAlgorithm, RTL_TEXTENCODING_ASCII_US).getStr());
134 // load ICU collator
135 collator = (RuleBasedCollator*) icu::Collator::createInstance(icuLocale, status);

--- 37 unchanged lines hidden ---
128 uppercase itself, so we don't have to bother with that.
129 */
130 icu::Locale icuLocale(
131 OUStringToOString(rLocale.Language, RTL_TEXTENCODING_ASCII_US).getStr(),
132 OUStringToOString(rLocale.Country, RTL_TEXTENCODING_ASCII_US).getStr(),
133 OUStringToOString(rAlgorithm, RTL_TEXTENCODING_ASCII_US).getStr());
134 // load ICU collator
135 collator = (RuleBasedCollator*) icu::Collator::createInstance(icuLocale, status);

--- 37 unchanged lines hidden ---