[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: escaping '-characters with Solid
On Fri, 27 Aug 1999, Angelic Engel wrote:
> ****** message to minivend-users from "Angelic Engel" <angelic@medusa.nl> ******
>
> hi
>
> I am using Minivend 3.12 on FreeBSD with Solid.
> When I want to add or change a string in the database, I have problems with
> using single quotes (').
> I thought that using the 'ESCAPE' tag with the string would solve this
> problem. But that is not the case.
The "escape" tag is really for embedding within Perl. In Perl, a
backslash escapes a character that might otherwise be interpreted.
Any use of any kind of quote character within a string is dangerous IMHO.
Especially in a system like MV that uses multiple layers of interpretation
and interfaces to all kinds of external programs, this is a danger.
> Using ESCAPE in minivend puts a backslash before the quote (\').
> Solid is an SQL database and according to the SQL standard that I have
> read and according to Solid a quote has to be escaped by adding an extra
> quote.
Different systems have different ways of escaping characters. Solid and
Perl do not use the same method.
> I have tried this and it works OK (not using the escape and adding extra
> quotes myselve with a piece of perl code).
>
> My question here is, should the escape not add a quote instead of the
> backslash. If not, when is this backslash used and is there also a standard
> minivend way to escape the quote with an extra quote
There is not a single "correct" way to escape characters. For instance,
in HTML, characters can be escaped using the syntax &#nnn where nnn is the
ASCII number of the character to be escaped. I ended up writing some tags
that would escape everything in HTML/URL format.
Best,
Kyle (KH)