From: Krishna Rokhale Date: 2010-03-07T16:23:11+09:00 Subject: Escaping strings Hi, This seems rather easy, but its got me stuck. i am using ruby DBI to insert records into a mysql database. dbh.do("INSERT INTO sentences (id,text) VALUES (#{id},#{sentence})") the sentence is a pretty long and complex string having many special characters. I cant seem to escape it out, i tried CGI and the %&& delimiters, but i cant get it to work. I appreciate your help! Thanks! -- Posted via http://www.ruby-forum.com/.