Re: MySQL Escaped String
Re: MySQL Escaped String
- Subject: Re: MySQL Escaped String
- From: Shawn Erickson <email@hidden>
- Date: Tue, 11 Jan 2005 10:21:08 -0800
On Jan 11, 2005, at 9:31 AM, Robin Hermann wrote:
Thanks. My head spins...
I just followed the documentation, which states that cString is or
will be deprecated and that I should use UTF8String instead. And so I
did ;-)
stringWithCString works fine for me though. Is there a way to catch
this kind of thing?
Note that a UTF8 string may not be a standard ASCII c string depending
on what characters are in the string (in UTF8 one or more bytes in a
row may be used to describe a character however ASCII characters will
be represented by a single byte in UTF8). You may want to review the
UNICODE standard (or summary documents about it) to get more
comfortable with it (<http://www.unicode.org/>).
So if mysql_escape_string is expecting a standard ASCII based c string
you may run into problems. So depending on what you are expecting
string wise consider using lossyCString instead of UTF8String since the
former will get you an ASCII c string by dumping the character that
cannot be represented in such a type of string.
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden