]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
simplify code so it always returns the same object
[wxWidgets.git] / src / common / intl.cpp
index c9203192eee99979beb9a66e5f4966beaeac4b35..a7aaf30597fa935963989ec64c64dc18323a187e 100644 (file)
@@ -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)