Herve Guillemet via RT wrote:
Show quoted text> Queue: DBD-mysql
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=24471 >
>
>
>
>>>I'm trying the mysql_enable_utf8 option with 4.001 with the following code
>>>just after connecting :
>>>
>>> $dbh->do("SET CHARACTER SET 'utf8'");
>>> $dbh->{mysql_enable_utf8} = 1;
>>>
>>>Data received are UTF8 but with the UTF8 flag off just as if the
>>>mysql_enable_utf8 option where not set. Could this is because
>>>my data tables are not UTF8 ?
>>>
>>>
>>>
>>Yes.
>>
>>
>>
>>>I'm a in a situation where the data are
>>>stored in latin1 in the database but I need to receive UTF8 only.
>>>
>>>
>>>
>>>
>>Herve,
>>
>>I would set UTF8 for the tables you need utf data from to ensure you get
>>UTF8 both in retrieving and inserting data.
>>
>>
>>
>
>Hi Patrick,
>
>Thanks for this reply.
>
>IMO, from the mysql client point of view, as long as it asks for UTF8 data
>with SET CHARACTER SET or SET NAMES, it's not its concern how the server
>stores the character, and it should receive the same UTF8 data whether the
>table is utf or latin.
>
>When under SET CHARACTER SET 'utf8', are there technical differences in
>the way DBD::mysql receives the data from UTF8 and latin tables ?
>
>In my case, using UTF for table storage is sub-optimal, and the perl
>client is based on a XML framework that needs UTF8 data. I have a
>currently working solution that subclasses DBI and add a layer of
>filtering, calling Encode::_utf8_on on all data received. But it's not so
>efficient and causes trouble when fetching BLOBS fo which we do not want
>utf8 on.
>
>Thanks again for your support,
>
>== Hervé Guillemet
>
>
Herve,
I'm not the biggest expert on UTF8, so if you could, please send me some
sort of script that reproduces this. That way, I have something to look
at in the driver code to see why it's not returning from the db what it
should.
Thanks!
Patrick
--
Patrick Galbraith, Senior Programmer
Grazr - Easy feed grazing and sharing
http://www.grazr.com
Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad