Re: What to do with UTF-8 data?

2003-09-11 Thread Jochen Wiedmann
Hi, Steve, [...] The problem is: How do I trap all input/output to/from DBI to do these conversions? [...] I've asked about this on the dbi-users mailing list, and the answer (from Tim Bunce, no less) was that it is really the responsibility of the DBD driver to perform such

Re: What to do with UTF-8 data?

2003-09-11 Thread Tim Bunce
On Thu, Sep 11, 2003 at 08:29:50AM +0200, Jochen Wiedmann wrote: Hi, Steve, The problem is: How do I trap all input/output to/from DBI to do these conversions? I've asked about this on the dbi-users mailing list, and the answer (from Tim Bunce, no less) was that it is really the

Re: What to do with UTF-8 data?

2003-09-11 Thread Steve Hay
Tim Bunce wrote: On Thu, Sep 11, 2003 at 08:29:50AM +0200, Jochen Wiedmann wrote: Hi, Steve, The problem is: How do I trap all input/output to/from DBI to do these conversions? I've asked about this on the dbi-users mailing list, and the answer (from Tim Bunce, no less) was that

Re: What to do with UTF-8 data?

2003-09-11 Thread Bart Lateur
On Thu, 11 Sep 2003 12:31:52 +0100, Steve Hay wrote: It would be cool if something akin to binmode STDOUT, ':utf8'; could be applied when sending data to the driver -- i.e. my data is in Perl's internal format, whether that be Latin-1 or UTF-8 in the case of the string at hand, and it all gets

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Chuck Fox wrote: Steve, I am a Sybase DBA, but in situations like this, I have declared the column on the table to be varbinary or binary and stored the data directly without conversion. Don't know if MySql supports this datatype. One can declare a column VARCHAR(n) BINARY for a similar

Re: What to do with UTF-8 data?

2003-09-10 Thread Peter J. Holzer
On 2003-09-10 08:33:03 +0100, Steve Hay wrote: Chuck Fox wrote: I am a Sybase DBA, but in situations like this, I have declared the column on the table to be varbinary or binary and stored the data directly without conversion. Don't know if MySql supports this datatype. One can declare

Re: What to do with UTF-8 data?

2003-09-10 Thread Bart Lateur
On Wed, 10 Sep 2003 08:33:03 +0100, Steve Hay wrote: And when I retrieve the data (again without conversion) I just get octet sequences into my Perl scalars - not flagged, UTF-8 character strings as I would like. If you're *sure* that this is UTF-8, only perl doesn't flag it as such, you can

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Bart Lateur wrote: On Wed, 10 Sep 2003 08:33:03 +0100, Steve Hay wrote: And when I retrieve the data (again without conversion) I just get octet sequences into my Perl scalars - not flagged, UTF-8 character strings as I would like. If you're *sure* that this is UTF-8, only perl doesn't

Re: What to do with UTF-8 data?

2003-09-10 Thread Bart Lateur
On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? Well, there are two options... either does the dtabase somewhere stores the flag indicating that some

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Bart Lateur wrote: On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? Well, there are two options... either does the dtabase somewhere stores the

Re: What to do with UTF-8 data?

2003-09-10 Thread Peter J. Holzer
On 2003-09-10 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? You could subclass DBI or DBD::MySQL and replace all methods with wrappers which perform the conversion. I'm

Re: What to do with UTF-8 data?

2003-09-10 Thread Peter J. Holzer
On 2003-09-10 12:14:25 +0200, Bart Lateur wrote: On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? Well, there are two options... either does the

Re: What to do with UTF-8 data?

2003-09-10 Thread Tim Bunce
On Wed, Sep 10, 2003 at 11:42:23AM +0100, Steve Hay wrote: Bart Lateur wrote: On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? Well, there are two

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Peter J. Holzer wrote: Since MySQL 4.1 does support UTF-8: Is it possible to upgrade from MySQL 3.23 to 4.1? I might be able to upgrade to 4.0 (I fact, I really ought to...), but I don't fancy 4.1 just yet -- it's still an alpha release :-( - Steve

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Peter J. Holzer wrote: On 2003-09-10 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns data? You could subclass DBI or DBD::MySQL and replace all methods with wrappers which

Re: What to do with UTF-8 data?

2003-09-10 Thread Steve Hay
Tim Bunce wrote: On Wed, Sep 10, 2003 at 11:42:23AM +0100, Steve Hay wrote: Bart Lateur wrote: On Wed, 10 Sep 2003 10:40:29 +0100, Steve Hay wrote: But the question was: How can I arrange for such conversions to be performed automatically by DBI whenever it receives or returns

What to do with UTF-8 data?

2003-09-09 Thread Steve Hay
Hi, Having looked through the list archives a bit, I see there has been lots of discussion over what to do with UTF-8 data, but I can't find anything that really helps me out now. I'm running Perl 5.8.0 with MySQL 3.23.56 (via DBD-mysql). Since (I think) there is no native UTF-8 support

Re: What to do with UTF-8 data?

2003-09-09 Thread Chuck Fox
PROTECTED] wrote: Hi, Having looked through the list archives a bit, I see there has been lots of discussion over what to do with UTF-8 data, but I can't find anything that really helps me out now. I'm running Perl 5.8.0 with MySQL 3.23.56 (via DBD-mysql). Since (I think) there is no native UTF