Re: NSString bug with test and really dodgy patch.

2012-10-03 Thread Ibadinov Marat
On Oct 3, 2012, at 12:19 PM, Jens Ayton wrote: > > In summary, "figure out what Cocoa does." :-) > Under OSX 10.6.8 it misbehaves badly with wide strings, but has no hard feelings about char arrays (not terminated by \0); I've got following output: 2012-10-03 15:51:34.667 printf[3894:903] ab

Re: NSString bug with test and really dodgy patch.

2012-10-03 Thread Jens Ayton
On Oct 3, 2012, at 09:53, Richard Frith-Macdonald wrote: > > So I'm not sure what to do ... the C standards have changed from working with > characters to working with bytes (which is good), Well, no. In the C standard, "character" generally means the same thing as "byte" (i.e., a value that

Re: NSString bug with test and really dodgy patch.

2012-10-03 Thread Richard Frith-Macdonald
On 3 Oct 2012, at 08:09, Wolfgang Lux wrote: > Richard Frith-Macdonald wrote: > >> We could probably adapt your patch to use precision as string lengh in those >> cases where it will work, but you can't catch all cases that way ... so >> maybe it's better if people find out as soon as possible

Re: NSString bug with test and really dodgy patch.

2012-10-03 Thread Richard Frith-Macdonald
On 3 Oct 2012, at 00:06, Stefan Bidi wrote: > I just wanted to weight in real quick. Chris proposed behavior is > exactly how I wrote the CoreBase string formatting function. I tested > this how fprintf() works on Debian and SUSE, and came to the same > conclusions as Chris. > > I believe, mor

Re: NSString bug with test and really dodgy patch.

2012-10-03 Thread Wolfgang Lux
Richard Frith-Macdonald wrote: > We could probably adapt your patch to use precision as string lengh in those > cases where it will work, but you can't catch all cases that way ... so maybe > it's better if people find out as soon as possible that c-strings have to be > nul terminated. > > Sor