From b8613f810e71943a3646b640c10efcadda480416 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 19 Nov 2012 11:54:12 +0000 Subject: [PATCH] Implement wxLocale::GetSystemEncodingName() for wxOSX. Use CFStringGetNameOfEncoding() to get the canonical name of the encoding from OS X itself. Closes #2571. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/intl.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index c9203192ee..a7aaf30597 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -781,8 +781,9 @@ wxString wxLocale::GetSystemEncodingName() UINT codepage = ::GetACP(); encname.Printf(wxS("windows-%u"), codepage); #elif defined(__WXMAC__) - // default is just empty string, this resolves to the default system - // encoding later + encname = wxCFStringRef::AsString( + CFStringGetNameOfEncoding(CFStringGetSystemEncoding()) + ); #elif defined(__UNIX_LIKE__) #if defined(HAVE_LANGINFO_H) && defined(CODESET) -- 2.50.0