RE: string encoding
RE: string encoding
- Subject: RE: string encoding
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Fri, 6 Jun 2003 09:58:22 -0400
You also might consider using NSString's -writeToFile:atomically: to write
the string and +stringWithContentsOfFile: or -initWithContentsOfFile: to
read the string. The string is written in the default C string encoding if
no information would be lost. Otherwise, it's written in Unicode encoding.
This is more or less the "default" encoding style in Cocoa.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Lloyd Dupont
>
Sent: Thursday, June 05, 2003 9:13 PM
>
To: email@hidden
>
Subject: string encoding
>
>
>
I'm about to write NSString(s) into a file.
>
I wondered about the most proper way ...
>
>
>
Anyway, I choose to use NSFileHandle, and use multiple call to
>
writeData:
>
now I have an other problem.
>
I wonder which encoding choose to write my string.
>
I see the NSString class gaves me the fastestEncoding, smallestEncoding
>
and the defaultCStringEncoding which look interesting.
>
I wonder if there is a defaultMacEncoding ?
>
what would you advise me ?
>
in case of doubt I will choose NSMacOSRomanStringEncoding
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.