зеркало из https://github.com/mozilla/gecko-dev.git
Bug 8792, fix for collation key creation.
This commit is contained in:
Родитель
1dbffc0d51
Коммит
d7274eb0a9
|
@ -129,7 +129,10 @@ nsresult nsCollation::CreateSortKey(nsICollation *inst, const nsCollationStrengt
|
|||
if (nsnull != aKey) {
|
||||
res = inst->CreateRawSortKey(strength, stringIn, aKey, &aLength);
|
||||
if (NS_SUCCEEDED(res)) {
|
||||
key.SetString((PRUnichar *) aKey, aLength / sizeof(PRUnichar));
|
||||
// set as char* makes every byte to be casted to PRUnichar
|
||||
// which doubles the key size, use CreateRawSortKey instead
|
||||
// to avoid this to happen
|
||||
key.SetString((char *) aKey, aLength / sizeof(char));
|
||||
}
|
||||
delete [] aKey;
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ nsresult nsCollationUnix::Initialize(nsILocale* locale)
|
|||
mCharset.SetString("ISO-8859-1"); //TODO: need to get this from locale
|
||||
|
||||
// store platform locale
|
||||
mLocale.SetString("en_US");
|
||||
mLocale.SetString("C");
|
||||
|
||||
if (locale != nsnull) {
|
||||
nsString aLocale;
|
||||
|
|
Загрузка…
Ссылка в новой задаче