for unknown locales check is needed even for ll[l][-CC] tag, fdo#86011 related
Found when investigating fdo#86011 where 'du-nl' was accepted and assigned an on-the-fly-ID even if the 'du' language code is not defined in ISO 639. If a tag is not internally known we need to check it using liblangtag and take no short cut assuming it would be alright even not for the simplest case. Change-Id: Ib8c1eb77b6b4a59019c4c8248b596bf53c0f4986
This commit is contained in:
@@ -1147,10 +1147,6 @@ bool LanguageTagImpl::canonicalize()
|
||||
convertLangToLocale();
|
||||
}
|
||||
if (mbInitializedLocale)
|
||||
{
|
||||
if (maLocale.Variant.isEmpty())
|
||||
meIsLiblangtagNeeded = DECISION_NO; // per definition ll[l][-CC]
|
||||
else
|
||||
{
|
||||
if (!mbInitializedLangID)
|
||||
{
|
||||
@@ -1166,7 +1162,6 @@ bool LanguageTagImpl::canonicalize()
|
||||
if (rKnowns.find( maBcp47) != rKnowns.end())
|
||||
meIsLiblangtagNeeded = DECISION_NO; // known fallback
|
||||
}
|
||||
}
|
||||
// We may have an internal override "canonicalization".
|
||||
lang::Locale aNew( MsLangId::Conversion::getOverride( maLocale));
|
||||
if (!aNew.Language.isEmpty() &&
|
||||
|
Reference in New Issue
Block a user