]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/cfstring.cpp
corrected wxLogErrors() in Clear() and Flush()
[wxWidgets.git] / src / mac / corefoundation / cfstring.cpp
index 0bb09db851e843df88bf8dc2a8389d62ba52b75c..73430139db95a0c389722c893c326db762f9f811 100644 (file)
@@ -107,6 +107,10 @@ wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding)
         encoding = wxLocale::GetSystemEncoding() ;
 #endif
     }
+    if ( encoding == wxFONTENCODING_SYSTEM )
+    {
+        enc = CFStringGetSystemEncoding();
+    }
 
     switch( encoding)
     {
@@ -629,7 +633,9 @@ wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding)
 // converts this string into a carbon foundation string with optional pc 2 mac encoding
 void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
 {
-    Release() ;
+    Release() ; 
+    if (st.IsEmpty())
+        return ;
 
     wxString str = st ;
     wxMacConvertNewlines13To10( &str ) ;