Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
8a07032d
Kaydet (Commit)
8a07032d
authored
Şub 13, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
do not use the raw locale for osl_getTextEncodingFromLocale()
Change-Id: Iab7402721b5fbf20a05c9ff2725e52b012df2940
üst
5918c7c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
syslocale.cxx
unotools/source/misc/syslocale.cxx
+15
-3
No files found.
unotools/source/misc/syslocale.cxx
Dosyayı görüntüle @
8a07032d
...
...
@@ -204,9 +204,21 @@ rtl_TextEncoding SvtSysLocale::GetBestMimeEncoding()
{
// If the system locale is unknown to us, e.g. LC_ALL=xx, match the UI
// language if possible.
::
com
::
sun
::
star
::
lang
::
Locale
aLocale
(
SvtSysLocale
().
GetUILanguageTag
().
getLocale
()
);
rtl_Locale
*
pLocale
=
rtl_locale_register
(
aLocale
.
Language
.
getStr
(),
aLocale
.
Country
.
getStr
(),
aLocale
.
Variant
.
getStr
()
);
SvtSysLocale
aSysLocale
;
const
LanguageTag
&
rLanguageTag
=
aSysLocale
.
GetUILanguageTag
();
// Converting blindly to Locale and then to rtl_Locale may feed the
// 'qlt' to rtl_locale_register() and the underlying system locale
// stuff, which doesn't know about it nor about BCP47 in the Variant
// field. So use the real language and for non-pure ISO cases hope for
// the best.. the fallback to UTF-8 should solve these cases nowadays.
/* FIXME-BCP47: the script needs to go in here as well, so actually
* we'd need some variant fiddling or glibc locale string and tweak
* rtl_locale_register() to know about it! But then again the Windows
* implementation still wouldn't know anything about it ... */
SAL_WARN_IF
(
!
rLanguageTag
.
isIsoLocale
(),
"unotools.i18n"
,
"SvtSysLocale::GetBestMimeEncoding - non-ISO UI locale"
);
rtl_Locale
*
pLocale
=
rtl_locale_register
(
rLanguageTag
.
getLanguage
().
getStr
(),
rLanguageTag
.
getCountry
().
getStr
(),
OUString
().
getStr
()
);
rtl_TextEncoding
nEnc
=
osl_getTextEncodingFromLocale
(
pLocale
);
pCharSet
=
rtl_getBestMimeCharsetFromTextEncoding
(
nEnc
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment