Re: forcing utf8 on selected values



Soe does a recent version of DBD::Pg (> = 1.40, pg_enable_utf8 database handle attribute), and with my patch (http://www.alexander-foken.de/unicode-patch.txt.gz, http://www.alexander-foken.de/README.unicode-patch.html) also DBD::ODBC 1.13.

For proper Unicode support on Oracle, you should use at least Oracle 9 on both client and server, and you should read http://search.cpan.org/~timb/DBD-Oracle-1.16/Oracle.pm#Unicode at least twice.

Alexander

On 29.03.2006 08:21, Garrett, Philip (MAN-Corporate) wrote:

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







--
Alexander Foken
mailto:alexander@xxxxxxxx http://www.foken.de/alexander/

.



Relevant Pages

  • Re: Fw: DBD::Oracle installation issues
    ... Most likely you have a US7ASCII as your default cahset in your DB while ... Perl is trying to force in something UTF8 the DB can't handle. ... Oracle db 10.1.0.4.0 64 bit ...
    (perl.dbi.users)
  • odd DBD::Oracle query hang with NLS_LANG and utf8-flagged bind parameter
    ... we are running DBD::Oracle against Oracle 9i client libraries. ... character encoding of the database is utf8. ... returning utf8-flagged perl scalars in rowsets. ... those returned scalars into a bind parameter for a prepared statement ...
    (perl.dbi.users)
  • DBD::Oracle hangs with NLS_LANG and utf8-flagged bind parameter?
    ... we are running DBD::Oracle against Oracle 9i client libraries. ... character encoding of the database is utf8. ... utf8-flagged perl scalars in rowsets. ... returned scalars into a bind parameter for a prepared statement that is ...
    (perl.dbi.users)
  • DBD::Oracle error when switching between utf8 and non-utf8
    ... I believe I have tripped a DBD::Oracle bug in the way it binds utf8 ... If I create a statement and execute it with a non-utf8 ... Oracle server: 9.2.5 ...
    (perl.dbi.users)
  • Re: Ruby, Unicode - ever?
    ... >>>(current state of UTF8 in Ruby, even with regexps, is too far away ... >>>from proper Unicode support, don't try to cheat me, that it's OK and ... > How would the regexp engine match multibyte UTF8 characters that have ...
    (comp.lang.ruby)