Re: LATIN SMALL LETTER U WITH DIAERESIS
Re: LATIN SMALL LETTER U WITH DIAERESIS
- Subject: Re: LATIN SMALL LETTER U WITH DIAERESIS
- From: Uli Kusterer <email@hidden>
- Date: Thu, 18 Jul 2013 01:56:52 +0200
On Jul 17, 2013, at 23:26, koko <email@hidden> wrote:
> NSString *filepath = [savePanel filename];
> const char * cFilePath = [[NSFileManager defaultManager] fileSystemRepresentationWithPath:filepath];
>
> Then in my low level I/O:
>
> FILE* f = NULL;
> f = fopen(path, mode);
>
> f is NULL i.e. path (the cFilePath from above) cannot open a file file writing.
>
> How should I get around this?
Have you tried using NSString’s -fileSystemRepresentation instead of the one in NSFileManager? Are you sure you’re passing the exact string in cFilePath to fopen()? Are you sure the path is still valid? (As soon as filepath is released or the current autorelease pool goes out of scope, the memory pointed to by cFilePath may be released) Add some logging, see if it logs the same thing for cFilePath and path. Also, what mode are you using? Does your user have write access to the folder you’re trying to save to? What file system is the destination disk formatted as?
— Uli
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden