Bug 62278 - debug warning fr_LU != fr_LU locales don't match
Summary: debug warning fr_LU != fr_LU locales don't match
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Localization (show other bugs)
Version:
(earliest affected)
4.0.2.1 rc
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:4.1.0 target:4.0.3
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-13 08:44 UTC by Lionel Elie Mamane
Modified: 2013-03-13 17:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2013-03-13 08:44:50 UTC
1) Open attachment 59233 [details] in a dbgutil build
2) click on "reports" in the left pane
3) in the lower right pane, double-click on "Bericht1"
4) Puzzling debug warning:


SvNumerFormatter::ImpGenerateCL: locales don't match:
fr-LU requested
fr-LU loaded

(never mind it crashes after that, that's another bug)

I did a break on that place:

            if ( rLoadedLocale != maLanguageTag )
            {
                OUString aMsg("SvNumberFormatter::ImpGenerateCL: locales don't match:");
                LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg ));
            }

(gdb) print rLoadedLocale
$3 = (const LanguageTag &) @0x7fffa67afd90: {
  maLocale = {
    Language = "fr", 
    Country = "LU", 
    Variant = ""
  }, 
  maBcp47 = "fr-LU", 
  maCachedLanguage = "", 
  maCachedScript = "", 
  maCachedCountry = "", 
  mpImplLangtag = 0x0, 
  mnLangID = 1023, 
  meIsValid = LanguageTag::DECISION_DONTKNOW, 
  meIsIsoLocale = LanguageTag::DECISION_DONTKNOW, 
  meIsIsoODF = LanguageTag::DECISION_DONTKNOW, 
  meIsLiblangtagNeeded = LanguageTag::DECISION_DONTKNOW, 
  mbSystemLocale = false, 
  mbInitializedBcp47 = true, 
  mbInitializedLocale = true, 
  mbInitializedLangID = false, 
  mbCachedLanguage = false, 
  mbCachedScript = false, 
  mbCachedCountry = false, 
  mbIsFallback = false
}
(gdb) print maLanguageTag
$4 = {
  maLocale = {
    Language = "fr", 
    Country = "LU", 
    Variant = ""
  }, 
  maBcp47 = "", 
  maCachedLanguage = "", 
  maCachedScript = "", 
  maCachedCountry = "", 
  mpImplLangtag = 0x0, 
  mnLangID = 5132, 
  meIsValid = LanguageTag::DECISION_DONTKNOW, 
  meIsIsoLocale = LanguageTag::DECISION_DONTKNOW, 
  meIsIsoODF = LanguageTag::DECISION_DONTKNOW, 
  meIsLiblangtagNeeded = LanguageTag::DECISION_DONTKNOW, 
  mbSystemLocale = true, 
  mbInitializedBcp47 = false, 
  mbInitializedLocale = true, 
  mbInitializedLangID = true, 
  mbCachedLanguage = false, 
  mbCachedScript = false, 
  mbCachedCountry = false, 
  mbIsFallback = false
}


It seems it is two different fr_LU in some way??? I traced the equality test, basically one gives an empty bcp47 and the other gives fr_LU.
Comment 1 Eike Rathke 2013-03-13 14:12:44 UTC
Taking.

The message is misleading. The rLoadedLocale is an explicit fr-LU locale, the maLanguageTag one is a system locale that also resolves to fr-LU.
Comment 2 Commit Notification 2013-03-13 15:52:54 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fb26196ce64979ab6dc6c82c0fbdeedb126a3433

added LanguageTag::equals(), fdo#62278 related



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2013-03-13 15:53:12 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dde0dcd553b676abcb41eaf3f9f1bf797907e22f

resolved fdo#62278 test for LanguageTag equality resolving system locale



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Eike Rathke 2013-03-13 16:22:34 UTC
Change pending review for 4-0 as https://gerrit.libreoffice.org/2707

Just because this is not only with dbgutil but also if environment variable OOO_ENABLE_LOCALE_DATA_CHECKS=Yes
Comment 5 Commit Notification 2013-03-13 17:04:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1e81d7220990765c0cbc1bdede6ad96bbb399cff&h=libreoffice-4-0

resolved fdo#62278 test for LanguageTag equality resolving system locale


It will be available in LibreOffice 4.0.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.