Re: NSString not working
Re: NSString not working
- Subject: Re: NSString not working
- From: Shawn Erickson <email@hidden>
- Date: Mon, 20 Apr 2009 16:02:33 -0700
On Mon, Apr 20, 2009 at 3:23 PM, Clark Cox <email@hidden> wrote:
> On Mon, Apr 20, 2009 at 12:49 PM, Shawn Erickson <email@hidden> wrote:
>> On Mon, Apr 20, 2009 at 10:17 AM, Jeremy Pereira <email@hidden> wrote:
>>
>>> By inspection it is easy to tell tmp is null terminated and that it conforms
>>> to the ISO Latin-1 encoding (seeing as it only contains ASCII characters).
>>
>> You are assuming the file encoding used for the file and/or the way
>> gcc is told treat string constants will result in something conforming
>> to ISO Latin-1. When compiled it could be 2 byte (or 4 byte) encoded
>> for example.
>
> That is simply not true. There is no way that "Blah" will be anything
> other than a 5-byte array with the following contents: {'B', 'l', 'a',
> 'h', '\0'}.
You can cause it to be something other then you may expect if you use
-fexec-charset and I think I recall other ways.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden