Home »
Public Forums »
archive »
Escaped Characters in string output
Escaped Characters in string output [message #81544] |
Mon, 24 September 2012 20:13 |
M. Katz
Messages: 69 Registered: May 2005
|
Member |
|
|
To prepare string data for a database, I'd like to escape all of the special characters. Other languages have built-in functions for this. Does IDL, or someone from the community have a routine they trust?
The special characters are
\ ' " NUL (ASCII 0) \n and \r and CTRL-Z
In essence I'd like to create a function that searches for these and places a backslash in front of each occurrence. See mysql_real_escape_string() http://dev.mysql.com/doc/refman/5.0/en/mysql-real-escape-str ing.html in PHP. In principle I suppose this is a good task for Regular Expressions, but I'm not enough of an expert.
Thanks
|
|
|
Current Time: Wed Oct 08 19:18:16 PDT 2025
Total time taken to generate the page: 0.00518 seconds