From: Meino Christian Cramer Date: 2003-08-29T23:28:28+09:00 Subject: Quoted string problem Hi, I have a """database""" of 11513 shortwave transmitters with their frequency, on-air time and a lot of other informations. These database is in a "flat ascii file": Each broadcaster gets one line of 294 charcters. Each "column" is only sperated from the others by known offsets. My little ruby program reads line by line (broadcaster by broadcaster) from this file and excerpts the wanted informations by expressions like "frequncy = line[22..27]". Then an sql-statement is formed and sent to mysqld, which inserts the data into the database. So far so nice... BUT! There is one filed called "comment" in the database, where ANYTHING printable can be exspected. One line says has a comment like International service "A". At this point, mysqld jumps from the rail and says "STOP! SYNTAX VIOLATED". Generally: how can I process input to escape "special" characters before I send them to mysqld? (In perl there is a command called "quotemeta", which does the thing...I found nothing equivalent in the docs for ruby). Kind regards and thank you very much for your help in advance. Meino