RE: forcing utf8 on selected values
- From: hedges@xxxxxxxx (Mark Hedges)
- Date: Wed, 29 Mar 2006 09:51:33 -0800 (PST)
On Wed, 29 Mar 2006, Garrett, Philip (MAN-Corporate) wrote:
My database has utf8 columns, server/client character sets and
collation. Yet when I call fetchrow, resulting Perl scalars do
not have the utf8 flag set. That's really annoying. Am I
supposed to call
map { utf8::upgrade($_) } $every,$stupid,$little,$scalar
every time I do a select statement? Or map through the results
of any selectall_*ref's? This fixes the display problems when
printing a page to a browser with charset utf-8.
Is there an easier way to do this? Please tell me there is.
What database are you using? Perhaps the driver has an option
to do this. I know Oracle does.
mysql.
I've been told this might work upon connecting:
$dbh->do('SET NAMES utf8')
But it doesn't have any effect.
Hmm, for some reason this morning the Matrix has allowed the
selected characters to display correctly in the browser. This
doesn't make a whole lot of sense to me now.
The scalars still do not have the utf8 flag set, though.
Mark
.
- Follow-Ups:
- RE: forcing utf8 on selected values
- From: Mark Hedges
- RE: forcing utf8 on selected values
- References:
- forcing utf8 on selected values
- From: Mark Hedges
- RE: forcing utf8 on selected values
- From: Philip Garrett
- forcing utf8 on selected values
- Prev by Date: Possible bug in execute_array with dbd::mysql
- Next by Date: Re: Message from Maintainer to DBD::mysql users, developers
- Previous by thread: Re: forcing utf8 on selected values
- Next by thread: RE: forcing utf8 on selected values
- Index(es):