Re: Representation of strings with special chars

2011-08-25 Thread Andreas Grosam
On Aug 26, 2011, at 2:02 AM, Glenn L. Austin wrote: > > On Aug 25, 2011, at 2:03 PM, Alexander Reichstadt wrote: > >> Hi, >> >> Thank you for your many responses. >> >>> const char *cstr = [s UTF8String]; >>> mysql_stmt_prepare(myStatement, cstr, strlen(cstr)); >> >> >> This fixed the bug

Re: Representation of strings with special chars

2011-08-25 Thread Glenn L. Austin
On Aug 25, 2011, at 2:03 PM, Alexander Reichstadt wrote: > Hi, > > Thank you for your many responses. > >> const char *cstr = [s UTF8String]; >> mysql_stmt_prepare(myStatement, cstr, strlen(cstr)); > > > This fixed the bug. > > Alexander Just in case the string has a NULL character, I'

Re: Representation of strings with special chars

2011-08-25 Thread Alexander Reichstadt
Hi, Thank you for your many responses. >const char *cstr = [s UTF8String]; >mysql_stmt_prepare(myStatement, cstr, strlen(cstr)); This fixed the bug. Alexander Am 24.08.2011 um 22:37 schrieb Greg Parker: > On Aug 24, 2011, at 1:24 PM, Alexander Reichstadt wrote: >> Actually it's a c

Re: Representation of strings with special chars

2011-08-24 Thread Jens Alfke
On Aug 24, 2011, at 3:45 PM, Greg Parker wrote: > That's because you are still using [s length] to get the length of [s > UTF8String]. Don't do that. If you add more umlauts then it will stop working > again. Ow. I didn’t see that problem in the code. Definitely a showstopper. Alexander, what

Re: Representation of strings with special chars

2011-08-24 Thread Greg Parker
On Aug 24, 2011, at 2:14 PM, Alexander Reichstadt wrote: > It seems a work-around is to append a space to the select-statement, mysql > does not care about that and it brings the umlaut-problem to cease in > select-statements. Does this only cover some other issue that is going to > return, or i

Re: Representation of strings with special chars

2011-08-24 Thread Jens Alfke
On Aug 24, 2011, at 2:14 PM, Alexander Reichstadt wrote: > It seems a work-around is to append a space to the select-statement, mysql > does not care about that and it brings the umlaut-problem to cease in > select-statements. Does this only cover some other issue that is going to > return, or

Re: Representation of strings with special chars

2011-08-24 Thread Alexander Reichstadt
It seems a work-around is to append a space to the select-statement, mysql does not care about that and it brings the umlaut-problem to cease in select-statements. Does this only cover some other issue that is going to return, or is this valid? I found a thread talking about the length with uml

Re: Representation of strings with special chars

2011-08-24 Thread Greg Parker
On Aug 24, 2011, at 1:24 PM, Alexander Reichstadt wrote: > Actually it's a couple of wrapper-classes to MYSQL c-calls by Karl Kraft. > > In the sqlfetch-class, eventually it arrives at > > mysql_stmt_prepare(myStatement, [s UTF8String],[s length]) > > where s is the NSString instance contain

Re: Representation of strings with special chars

2011-08-24 Thread Alexander Reichstadt
Actually it's a couple of wrapper-classes to MYSQL c-calls by Karl Kraft. In the sqlfetch-class, eventually it arrives at mysql_stmt_prepare(myStatement, [s UTF8String],[s length]) where s is the NSString instance containing the SELECT-statement, such as SELECT field="someÜberthing". From

Re: Representation of strings with special chars

2011-08-24 Thread Lee Ann Rucker
On Aug 24, 2011, at 11:14 AM, David Duncan wrote: > On Aug 24, 2011, at 11:07 AM, Alexander Reichstadt wrote: > >> we have a phenomenon, that is not quite clear. This is with 10.6.7 Xcode 4.0. >> >> NSArray *test = [NSArray arrayWithObject:@"ÜÄÖüäö"]; >> NSLog(@"%@",test); >> NSLog(@"%@",

Re: Representation of strings with special chars

2011-08-24 Thread Sean McBride
On Wed, 24 Aug 2011 20:07:40 +0200, Alexander Reichstadt said: >Reason to ask and problem to solve is, that the values with Umlauts are >to be passed on to an SQL backend, and in some cases the umlauts are not >forwarded correctly. Escaped they return no answer or, even worse, cause >an SQL error

Re: Representation of strings with special chars

2011-08-24 Thread David Duncan
On Aug 24, 2011, at 11:07 AM, Alexander Reichstadt wrote: > we have a phenomenon, that is not quite clear. This is with 10.6.7 Xcode 4.0. > >NSArray *test = [NSArray arrayWithObject:@"ÜÄÖüäö"]; >NSLog(@"%@",test); >NSLog(@"%@",[test objectAtIndex:0]); > > This prints out the followin