RE: forcing utf8 on selected values




What database are you using? Perhaps the driver has an option to do this. I know Oracle does.

-----Original Message-----
From: Mark Hedges [mailto:hedges@xxxxxxxx]
Sent: Tue 3/28/2006 9:39 PM
To: dbi-users@xxxxxxxx
Subject: forcing utf8 on selected values


There are several to-do items regarding utf8 that would be
great, but aren't here yet.

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.

Mark




Relevant Pages

  • Re: datetime problem
    ... Matt Garrish wrote: ... If you only have one day's data in your database ... it ok and it snot by default in utf8 thats myu question. ... ISO-8859-7 string. ...
    (comp.lang.perl.misc)
  • more DBD::Oracle utf8 weirdness, and kludge that should not have worked, but did
    ... original UTF8 data. ... the database, and retrieve it. ... before comparing the translated data with the retrieved data, ...
    (perl.dbi.users)
  • Re: LANG and NLS_LANG for UTF8
    ... When I do export/import of database, do I also need to set LANG=C.utf8 ... good enough to preserve UTF8 characters which are non ASCII. ... have not been able to insert non ASCII utf8 ...
    (comp.databases.oracle.server)
  • Re: openOffice Php MySQL
    ... Also the csv is utf8 and this has been told to the importing tool. ... I only found this problem when debugging the scripts. ... UTF-8 character encoding in openSUSE, ... The other user gets all permissions on the database: ...
    (alt.os.linux.suse)
  • Re: datetime problem
    ... If you only have one day's data in your database ... ISO-8859-7 string. ... there's no implicit conversion to utf8 just because that's what you're ...
    (comp.lang.perl.misc)