http://qs321.pair.com?node_id=1092010

loudstil has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I'm using DBIx::Class to fetch data from Oracle (11.2). when the data fetched, for example "Alfred Kärcher" its returns the value as "Alfred Karcher". I tried to add the $ENV NLS_LANG and NLS_NCHAR but still no change. I also used the utf8 module to verify that the data is utf8 encoded. Thanks in advance, Loudstil
  • Comment on DBIx::Class converting values with umlaut

Replies are listed 'Best First'.
Re: DBIx::Class converting values with umlaut
by kennethk (Abbot) on Jul 02, 2014 at 16:31 UTC
    What I've found works well for UTF-8 I/O for Oracle is:
    $ENV{NLS_LANG} = 'AMERICAN_AMERICA.AL32UTF8'; my $db = DBI->connect( $dbid, $source_user, $source_pass, { PrintError => 0, RaiseError => 1, AutoCommit => 0, ora_charset => 'AL32UTF8', }, );
    How does this compare to the values you use?

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re: DBIx::Class converting values with umlaut
by jellisii2 (Hermit) on Jul 02, 2014 at 16:06 UTC
    This may be relevant.
Re: DBIx::Class converting values with umlaut
by pajout (Curate) on Jul 03, 2014 at 14:47 UTC
    Just another hint: Additionally check if output string (perl variable) has utf8 flag set, because not-flagged but properly encoded utf8 string can be easily misunderstood by perl in some cases.