Re: MySQL Escaped String
Re: MySQL Escaped String
- Subject: Re: MySQL Escaped String
- From: Will Mason <email@hidden>
- Date: Tue, 11 Jan 2005 11:33:54 -0800 (PST)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
> 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.
It's true that the best approach is to figure out which encoding
mysql_escape_string() is expecting, and encode the string using that.
Note that [NSString lossyCString] will only return an ASCII-encoded
string if ASCII is the default encoding for the machine running the
code, which is highly unlikely. It's much more likely that the default
encoding will be something like Latin-1 if you're in North or South
America or in Europe. ASCII is not an alias for Latin-1.
Will
_______________________________________________
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