tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dave.pr...@bt.com
Subject RE: Handling apostrophes
Date Mon, 22 Oct 2001 09:33:09 GMT
Sounds like a bigger overhead than encode

Dave 



-----Original Message-----
From: David Treves [mailto:dwork@macam.ac.il]
Sent: 22 October 2001 10:09
To: tomcat-user
Subject: Re: Handling apostrophes


Hi there,

you should simply duplicate in every input string the apostrophe.

Meaning that if the input string is:

eee'eee

after manipulating it - BEFORE inserting it to the DB it will be:

eee''eee  (  ' twice, NOT A double quote)

in the DB it will appear as SINGLE apostrophe.


That will work!  :o)
David.

----- Original Message -----
From: <dave.prout@bt.com>
To: <tomcat-user@jakarta.apache.org>
Sent: Monday, October 22, 2001 10:55 AM
Subject: Handling apostrophes


> Hi all,
>
> I'm developing an application which uses java servlets and JSPs and
> a MySQL database running on Tomcat 4.0.
>
> I take user input, store it on the db, then display it again. As
> soon as someone tried inputiing an apostrophe, it all fell over. It seems
> that I have to encode and decode every single text field. Is this correct,
> or is there a better way ?
>
> Thanks
>
> Dave
>
>

Mime
View raw message