]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/intl.cpp
don't give error messages if ws2_32.dll is not available in wxGetHostName()
[wxWidgets.git] / src / common / intl.cpp
index 74aae5cae4d11d37d6884305bd4f27ef61df1860..43e74bf0819f1c24ebf7264c555dc8e33ec66fc5 100644 (file)
@@ -2245,7 +2245,13 @@ wxFontEncoding wxLocale::GetSystemEncoding()
         return wxFONTENCODING_CP950;
     }
 #elif defined(__WXMAC__)
-    return wxMacGetFontEncFromSystemEnc( CFStringGetSystemEncoding() ) ;
+       TextEncoding encoding = 0 ;
+#if TARGET_CARBON
+       encoding = CFStringGetSystemEncoding() ;
+#else
+        UpgradeScriptInfoToTextEncoding ( smSystemScript , kTextLanguageDontCare , kTextRegionDontCare , NULL , &encoding ) ;
+#endif
+    return wxMacGetFontEncFromSystemEnc( encoding ) ;
 #elif defined(__UNIX_LIKE__) && wxUSE_FONTMAP
     wxString encname = GetSystemEncodingName();
     if ( !encname.empty() )
@@ -2428,15 +2434,16 @@ const wxChar *wxLocale::GetString(const wxChar *szOrigString,
             if ( szDomain != NULL )
             {
                 wxLogTrace(_T("i18n"),
-                           _T("string '%s'[%d] not found in domain '%s' for locale '%s'."),
-                           szOrigString, (int)n, szDomain, m_strLocale.c_str());
+                           _T("string '%s'[%lu] not found in domain '%s' for locale '%s'."),
+                           szOrigString, (unsigned long)n,
+                           szDomain, m_strLocale.c_str());
 
             }
             else
             {
                 wxLogTrace(_T("i18n"),
-                           _T("string '%s'[%d] not found in locale '%s'."),
-                           szOrigString, (int)n, m_strLocale.c_str());
+                           _T("string '%s'[%lu] not found in locale '%s'."),
+                           szOrigString, (unsigned long)n, m_strLocale.c_str());
             }
         }
 #endif // __WXDEBUG__