]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/filefn.cpp
Changes needed for scanning the aui header files with SWIG for
[wxWidgets.git] / src / common / filefn.cpp
index dec3887eb36b35d8492cdf6eaf5c36fe1cbb1131..5824391e0f770f77d747f32643406b284113a96c 100644 (file)
@@ -881,13 +881,19 @@ wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathCompon
     }
     CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, kDefaultPathStyle);
     CFRelease( fullURLRef ) ;
-    return wxMacCFStringHolder(cfString).AsString(wxLocale::GetSystemEncoding());
+    CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfString);
+    CFRelease( cfString );
+    CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);    
+    return wxMacCFStringHolder(cfMutableString).AsString(wxLocale::GetSystemEncoding());
 }
 
 OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef )
 {
     OSStatus err = noErr ;
-    CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, wxMacCFStringHolder(path ,wxLocale::GetSystemEncoding() ) , kDefaultPathStyle, false);
+    CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, wxMacCFStringHolder(path ,wxLocale::GetSystemEncoding() ) ) ;
+    CFStringNormalize(cfMutableString,kCFStringNormalizationFormD);    
+    CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kDefaultPathStyle, false);
+    CFRelease( cfMutableString );
     if ( NULL != url )
     {
         if ( CFURLGetFSRef(url, fsRef) == false )
@@ -906,7 +912,10 @@ wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname )
     CFStringRef cfname = CFStringCreateWithCharacters( kCFAllocatorDefault,
                                                       uniname->unicode,
                                                       uniname->length );
-    return wxMacCFStringHolder(cfname).AsString() ;
+    CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, cfname);
+    CFRelease( cfname );
+    CFStringNormalize(cfMutableString,kCFStringNormalizationFormC);    
+    return wxMacCFStringHolder(cfMutableString).AsString() ;
 }
 
 wxString wxMacFSSpec2MacFilename( const FSSpec *spec )