[Biococoa-dev] initWithUTF8String not working properly
Charles Parnot
charles.parnot at gmail.com
Tue Jul 19 18:55:13 EDT 2005
You could also try a cast:
symbolString = [[NSString alloc] initWithBytes:(const void*)&aChar
length:1 encoding:NSUTF8StringEncoding];
charles
NB: you probably also had a crash or weird thing when you used aChar
instead of aChar, right?
On Jul 19, 2005, at 3:19 PM, Koen van der Drift wrote:
>
> On Jul 19, 2005, at 5:39 PM, Charles Parnot wrote:
>
>
>> Don't know about the warning, but the code should be
>>
>> symbolString = [[NSString alloc] initWithBytes:&aChar length:
>> sizeof(unsigned char) encoding: NSUTF8StringEncoding];
>>
>> Actually, maybe the warning will go, as the method signature will
>> then be different.
>>
>> charles
>>
>> NB: and you could safely go with:
>>
>> symbolString = [[NSString alloc] initWithBytes:&aChar length:1
>> encoding:NSUTF8StringEncoding];
>>
>>
>
>
>
> Nope, I still get the same warning. Maybe has this to do with the
> SDK we are using?
>
> Anyway, the crash is gone now, so that's good news!
>
>
> cheers,
>
>
> - Koen.
>
--
Xgrid-at-Stanford
Help science move fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford
Charles Parnot
charles.parnot at gmail.com
More information about the Biococoa-dev
mailing list