unicode savvy conversions

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-02-08 09:52:19 +00:00
parent 56b88f1276
commit 305a0f6057
2 changed files with 26 additions and 8 deletions

View File

@@ -322,10 +322,19 @@ pascal Boolean CrossPlatformFilterCallback (
{
FSRef fsref ;
memcpy( &fsref , *theItem->dataHandle , sizeof(FSRef) ) ;
wxString file ;
const short maxpath = 1024 ;
FSRefMakePath( &fsref , (UInt8*) file.GetWriteBuf(maxpath+1),maxpath) ;
file.UngetWriteBuf() ;
CFURLRef fullURLRef;
fullURLRef = ::CFURLCreateFromFSRef(NULL, &fsref);
#ifdef __UNIX__
CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle;
#else
CFURLPathStyle pathstyle = kCFURLHFSPathStyle;
#endif
CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle);
wxString file = wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding());
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
}
#endif

View File

@@ -322,10 +322,19 @@ pascal Boolean CrossPlatformFilterCallback (
{
FSRef fsref ;
memcpy( &fsref , *theItem->dataHandle , sizeof(FSRef) ) ;
wxString file ;
const short maxpath = 1024 ;
FSRefMakePath( &fsref , (UInt8*) file.GetWriteBuf(maxpath+1),maxpath) ;
file.UngetWriteBuf() ;
CFURLRef fullURLRef;
fullURLRef = ::CFURLCreateFromFSRef(NULL, &fsref);
#ifdef __UNIX__
CFURLPathStyle pathstyle = kCFURLPOSIXPathStyle;
#else
CFURLPathStyle pathstyle = kCFURLHFSPathStyle;
#endif
CFStringRef cfString = CFURLCopyFileSystemPath(fullURLRef, pathstyle);
wxString file = wxMacCFStringHolder(cfString).AsString(wxFont::GetDefaultEncoding());
display = CheckFile( file , theInfo->fileAndFolder.fileInfo.finderInfo.fdType , data ) ;
}
#endif