9 messages in com.mysql.lists.perlRe: What to do with UTF-8 data?| From | Sent On | Attachments |
|---|---|---|
| Steve Hay | 10 Sep 2003 08:50 | |
| Tim Bunce | 11 Sep 2003 03:48 | |
| Steve Hay | 11 Sep 2003 04:31 | |
| Bart Lateur | 11 Sep 2003 07:25 | |
| Rudy Lippan | 11 Sep 2003 08:56 | |
| Steve Hay | 11 Sep 2003 10:09 | |
| Rudy Lippan | 11 Sep 2003 10:36 | |
| Steve Hay | 12 Sep 2003 00:58 | |
| Steve Hay | 06 Oct 2003 03:15 |
| Subject: | Re: What to do with UTF-8 data?![]() |
|---|---|
| From: | Rudy Lippan (rlip...@remotelinux.com) |
| Date: | 09/11/2003 10:36:47 AM |
| List: | com.mysql.lists.perl |
On Thu, 11 Sep 2003, Steve Hay wrote:
Rudy Lippan wrote:
On Wed, 10 Sep 2003, Steve Hay wrote:
You might be able to use some of the Class::DBI features to get this write now;
I am using Class::DBI, actually, but I couldn't figure out a way to do this with it. There is a select trigger, but the before_set_* triggers are per-column, which I'm too lazy to set up.
:-)
or, if you would like (and don't mind using pre-alpa code), I could hack up a patch this weekend that would give you a mysql_enable_utf8 flag that if enabled will try and guess the types (as DBD::Pg does right now).
I like the idea that Tim Bunce suggested the other day, namely:
"a driver private option could be used to indicate that all char fields are UTF-8, or else have some way of indicating that per-column, such as $sth->bind_col(1, undef, { mysql_charset => 'utf8' });"
(In fact, he later improved the latter part of that idea to: "something like ..., { mysql_is_utf8 => 1 });").
I would be particularly interested in the "all char fields are UTF-8" bit.
If you could do something along those lines (for MySQL 3.23) that'd be great.
I was thinking something along the way we went with this for DBD::Pg. Take a look at the docs for the latest dev version and let me know what you think -- It is on CPAN.
(BTW, There has been further discussion about all this on the dbi-users list since I brought my question over to this list. Take a look at that, if you haven't seen it already, before you do anything!)
I know... I am just a few days behind on my dbi-users.
Rudy




