comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Escaped Characters in string output
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Escaped Characters in string output [message #81544] Mon, 24 September 2012 20:13
M. Katz is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: For loop avoidance - getting indices of real space
Next Topic: Strange behavior of function READ in a loop.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:18:16 PDT 2025

Total time taken to generate the page: 0.00518 seconds