From: Meino Christian Cramer Date: 2003-08-30T22:18:18+09:00 Subject: Re: Quoted string problem From: Brian Candler Subject: Re: Quoted string problem Date: Sat, 30 Aug 2003 18:26:15 +0900 Hi Brian ! > mysql-ruby contains a class method: Mysql.escape_string (alias Mysql.quote) > which does exactly what you want. > > Have you checked the documentation for ruby-mysql to see if it has such a > function? If not, maybe you should change. I FOUND IT !!! OH HAPPY DAY !!! ;))) Thank you for directly pointing me to things which I already have :O))) I was too blind... But now another probelm hits me: The data for my (hopefully soon existing) shortwave broadcaster database is read line by line (broadcaster by broadcaster) from a "pure text" file. On position 279 there is a single character, which reflects the status of the broadcaster. It one character of [A-Z]. I did the following: status = line[279] I got 72 ("H" is the 72scnd character of the ASCII table.) Oh, I thought...better to do a status = status.to_s() Now I got a "72" Damn! In the input file there is literally a "H". How can I convince Ruby to read a "H" and no "72" or 72? Sometimes I think, the "principle of leas surprise" isn't working everywhere to its completeness.... ;) Kind regards, Meino