Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 96195 Details for
Bug 143894
new package mail-client/mahogany-0.67
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
030-utf8warn.patch
030-utf8warn.patch (text/plain), 2.62 KB, created by
Róbert Čerňanský
on 2006-09-06 10:33:25 UTC
(
hide
)
Description:
030-utf8warn.patch
Filename:
MIME Type:
Creator:
Róbert Čerňanský
Created:
2006-09-06 10:33:25 UTC
Size:
2.62 KB
patch
obsolete
>diff -Naur mahogany-0.67.cvs/include/gui/wxMApp.h mahogany-0.67.utf8warn/include/gui/wxMApp.h >--- mahogany-0.67.cvs/include/gui/wxMApp.h 2006-09-04 20:27:35.000000000 +0200 >+++ mahogany-0.67.utf8warn/include/gui/wxMApp.h 2006-09-04 20:22:24.000000000 +0200 >@@ -81,6 +81,8 @@ > virtual bool CanClose() const; > virtual void OnClose(); > >+ wxFontEncoding GetSystemEncoding_Workaround(); >+ > // wxWin calls these functions to start/run/stop the application > virtual bool OnInit(); > virtual int OnRun(); >diff -Naur mahogany-0.67.cvs/src/gui/wxMApp.cpp mahogany-0.67.utf8warn/src/gui/wxMApp.cpp >--- mahogany-0.67.cvs/src/gui/wxMApp.cpp 2006-09-04 20:27:41.000000000 +0200 >+++ mahogany-0.67.utf8warn/src/gui/wxMApp.cpp 2006-09-04 20:22:36.000000000 +0200 >@@ -909,6 +909,39 @@ > #endif // 0 > } > >+wxFontEncoding wxMApp::GetSystemEncoding_Workaround() >+{ >+ const wxString encname = wxLocale::GetSystemEncodingName(); >+ if ( !encname.empty() ) >+ { >+ wxFontEncoding enc = wxFontMapperBase::GetEncodingFromName(encname); >+ >+ // on some modern Linux systems (RedHat 8) the default system locale >+ // is UTF8 -- but it isn't supported by wxGTK1 in ANSI build at all so >+ // don't even try to use it in this case >+#if !wxUSE_UNICODE && \ >+ ((defined(__WXGTK__) && !defined(__WXGTK20__)) || defined(__WXMOTIF__)) >+ if ( enc == wxFONTENCODING_UTF8 ) >+ { >+ // the most similar supported encoding... >+ enc = wxFONTENCODING_ISO8859_1; >+ } >+#endif // !wxUSE_UNICODE >+ >+ // GetEncodingFromName() returns wxFONTENCODING_DEFAULT for C locale >+ // (a.k.a. US-ASCII) which is arguably a bug but keep it like this for >+ // backwards compatibility and just take care to not return >+ // wxFONTENCODING_DEFAULT from here as this surely doesn't make sense >+ if ( enc != wxFONTENCODING_MAX && enc != wxFONTENCODING_DEFAULT ) >+ { >+ return enc; >+ } >+ //else: return wxFONTENCODING_SYSTEM below >+ } >+ >+ return wxFONTENCODING_SYSTEM; >+} >+ > // app initilization > bool > wxMApp::OnInit() >@@ -1102,12 +1135,10 @@ > } > #endif // USE_I18N > >- // wxLocale::GetSystemEncoding() is broken in wx <= 2.6.3, it returns >- // ISO-8859-1 for UTF-8 locale >-#if defined(__WXGTK20__) && wxCHECK_VERSION(2, 6, 4) >+#ifdef __WXGTK20__ > // we need UTF-8 support to be able to work with messages in different > // encodings >- if ( wxLocale::GetSystemEncoding() != wxFONTENCODING_UTF8 ) >+ if ( GetSystemEncoding_Workaround() != wxFONTENCODING_UTF8 ) > { > // TODO: set encoding to UTF-8 (but keeping the current language) > // ourselves
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 143894
:
94250
|
94251
|
94252
|
96190
|
96191
|
96192
|
96193
|
96195
|
118556
|
118557
|
118558
|
118560