• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MySQL Escaped String
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: MySQL Escaped String
      • From: Robin Hermann <email@hidden>
References: 
 >Re: MySQL Escaped String (From: Shawn Erickson <email@hidden>)

  • Prev by Date: NSTableView addTableColumn
  • Next by Date: Re: Howto receive text notifications from NSFormCells in an NSForm
  • Previous by thread: Re: MySQL Escaped String
  • Next by thread: Re: MySQL Escaped String
  • Index(es):
    • Date
    • Thread