Re: Database character sets

[prev] [thread] [next] [Date index for 2005/02/22]

From: Tom Insam
Subject: Re: Database character sets
Date: 19:11 on 22 Feb 2005
On Feb 22, 2005, at 18:04, Dan Sully wrote:
>
> Perrin is right, in that it's more of a DBI issue, however, I've had 
> to deal
> with this as well. Assuming all of your data is flagged / encoded as 
> UTF-8 on
> the way into the database:
>
> # overload Class::DBI's get, because DBI doesn't support auto-flagging 
> of utf8
> # data retrieved from the db, we need to do it ourselves.
> sub get {

...

uh.. This is horribly dangerous, and will lead to things like segfaults 
if the stuff in the database _isn't_ utf8. Using Encode::decode_utf() 
would be much safer, though slower.

Any pointers for hooking DB writes?

Database character sets
Tom Insam 15:18 on 22 Feb 2005

Re: Database character sets
Perrin Harkins 17:38 on 22 Feb 2005

Re: Database character sets
Tom Insam 18:05 on 22 Feb 2005

Re: Database character sets
Drew Wilson 18:23 on 22 Feb 2005

Re: Database character sets
Tom Insam 19:09 on 22 Feb 2005

Re: Database character sets
Dan Sully 18:04 on 22 Feb 2005

Re: Database character sets
Tom Insam 19:11 on 22 Feb 2005

Re: Database character sets
Dan Sully 19:15 on 22 Feb 2005

Generated at 00:32 on 04 Mar 2005 by mariachi v0.52