Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] perl DBI special chars handling


(the issue is solved by now, as I commented in a previous email to the list)

That could be a solution, but the problem is that there's searching
involved. If I do encode all content as HTML before dumping it into a
database, then I may as well have to encode all search terms before
performing a search, and that will have impact when, for example,
somebody looks for "voila". I won't be returning any "voilá" as a
search result.

But thanks anyway  =)


On 1/12/06, Rene Cunningham <rene@xxxxxxxxxxxxx> wrote:
> On Mon, Jan 09, 2006 at 01:57:38AM -0800, Julio Cesar Ody wrote:
> > If I print the contents of the variables to the shell, I can notice
> > that perl uses the accents and everything correctly, so it has to be
> > something DBI is doing either on prepare() or execute(). Any ideas on
> > where I can find a fix for that? I've been through DBI's docs a
> > hundred times and I still can't find anything related.
>
> Hi,
>
> You may have some luck with URI::Escape to escape your strings before
> you insert them into the database. If you're extracting the data with
> perl URI::Escape provides uri_unescape(). Ive had a similar problem and
> perl URI saved the day.
>
> --
> Rene Cunningham
> DCLabs Pty Ltd
> http://www.dclabs.com.au
>


--
Julio C. Ody
http://rootshell.be/~julioody