• 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: 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


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

  • Prev by Date: Re: MySQL Escaped String
  • Next by Date: Re: Authorization - Perl as helper tool vs. SUID
  • Previous by thread: Re: MySQL Escaped String
  • Next by thread: Re: MySQL Escaped String
  • Index(es):
    • Date
    • Thread