Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] perl DBI special chars handling

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.


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