FROM : Douglas Davidson
DATE : Fri Jul 21 17:54:11 2006
On Jul 21, 2006, at 8:44 AM, Tommy Nordgren wrote:
>> out_name = [fileName cString];
>> writing = fopen(out_name, "w");
>> fprintf(writing, everything); //looping over the matrix
>>
>> This works, but I am afraid that it will break when the fileName
>> contains non-ASCII characters. Is there another fast way to write
>> a large C-array to a file that does work with non-ASCII filenames?
>>
>> Thanks in advance, Patrick
>>
>>
> Test with [filename UTF8String]
> I have tested this with a small project, using Swedish characters
>
Don't use -cString ever! Don't use -UTF8String for filesystem names!
Use the method designed for this: -fileSystemRepresentation.
If you're coming to WWDC, come to session 150 to find out why.
Look at NSPathUtilities.h and NSFileManager.h for more extensive
methods for dealing with paths.
Douglas Davidson
DATE : Fri Jul 21 17:54:11 2006
On Jul 21, 2006, at 8:44 AM, Tommy Nordgren wrote:
>> out_name = [fileName cString];
>> writing = fopen(out_name, "w");
>> fprintf(writing, everything); //looping over the matrix
>>
>> This works, but I am afraid that it will break when the fileName
>> contains non-ASCII characters. Is there another fast way to write
>> a large C-array to a file that does work with non-ASCII filenames?
>>
>> Thanks in advance, Patrick
>>
>>
> Test with [filename UTF8String]
> I have tested this with a small project, using Swedish characters
>
Don't use -cString ever! Don't use -UTF8String for filesystem names!
Use the method designed for this: -fileSystemRepresentation.
If you're coming to WWDC, come to session 150 to find out why.
Look at NSPathUtilities.h and NSFileManager.h for more extensive
methods for dealing with paths.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| PGM | Jul 21, 17:04 | |
| Dado Colussi | Jul 21, 17:27 | |
| Tommy Nordgren | Jul 21, 17:44 | |
| Douglas Davidson | Jul 21, 17:54 | |
| Bill Bumgarner | Jul 21, 18:01 | |
| Uli Kusterer | Jul 21, 18:21 | |
| Steve Bird | Jul 24, 03:29 | |
| Bill Bumgarner | Jul 24, 04:26 | |
| PGM | Jul 24, 04:40 | |
| Jakob Olesen | Jul 24, 10:15 | |
| PGM | Jul 24, 15:55 | |
| Michael Ash | Jul 24, 17:39 |






Cocoa mail archive

