- To: slug <slug@xxxxxxxxxxx>
- Subject: Re: [SLUG] perl DBI special chars handling
- From: Julio Cesar Ody <julioody@xxxxxxxxx>
- Date: Thu, 12 Jan 2006 11:37:54 +1000
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=alIziw04X0M644Vl9sLqEew7Tg5C5RklPS3BSlGgPFNc8eQNf33J5+S027cXdDWy3gJphQWg6A3iGWAy3wUX7InLaQ4XR5ifkHjdgotzjdP070Ttq6ghZGB/e7iKpUqwYTnvIdN85Ezt/rAtZ3TD1ixr7SkErA+PvnQTu6jonGM=
(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