tomcat-users mailing list archives

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


-----Original Message-----
From: David Treves []
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:


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)

----- Original Message -----
From: <>
To: <>
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

View raw message