RE: problems getting Hebrew strings from Oracle



-----Original Message-----
From: Sagiv Barhoom [mailto:sagivba@xxxxxxxxx]
Sent: Friday, April 28, 2006 11:28 AM
To: dbi-users@xxxxxxxx
Subject: problems getting Hebrew strings from Oracle

Hi all,
I have 2 machines: linux_perl_machine and sql_server (Oracle 9i).

I am trying to connect from the perl machine to the sql_server and
execute :
"select Hebrew from Hebrew_Table" ,
but all I get is somthing like: '???? ??????'

Non-latin character sets are represented with question marks by some
terminal
emulators (SecureCRT for one). You haven't said exactly where you're
seeing
"???? ??????". Is it in your terminal window? In the browser in some
web
application?

One way to find out if you're actually getting the right strings back
from the
database is to use Data::Dumper like this:

use Data::Dumper;

while (my ($hebrew) = $sth->fetchrow) {
print Dumper($hebrew);
}

If you see '$VAR1 = "???? ??????"' then you probably have a client
encoding
problem (see below).

If you see something like '$VAR1 = "\x{12c}\x{25a}..."' (the idea being
the
characters are Unicode, not actual question marks) then your problem is
simply
the program you're using to view the query results.

The perl machine is not local and I work on it via ssh.
The db encoding is logical and the linux_perl_machine is:

LANG=he_IL.UTF-8
[snip]

These will affect how Perl handles locales. They don't really affect the
Oracle client, though. You'll need to set NLS_LANG to get Oracle working
right, e.g.:

export NLS_LANG=HEBREW_ISRAEL.AL32UTF8

# might also be necessary:
export NLS_NCHAR=AL32UTF8

See
http://search.cpan.org/~pythian/DBD-Oracle-1.17/Oracle.pm#Perl_and_Unico
de

hth,
Philip
.



Relevant Pages

  • Re: VW --> Bianary file into CLOB or BLOB
    ... Page 1252 encoding, which is normal Windows encoding for Western European ... the database as I manage this on both PostgreSQL, Oracle and ODBC ... My outstanding problem was to create a valid ByteArray from no matter ...
    (comp.lang.smalltalk)
  • Re: VW --> Bianary file into CLOB or BLOB
    ... Page 1252 encoding, which is normal Windows encoding for Western European alphabets. ... the database as I manage this on both PostgreSQL, Oracle and ODBC following the documentation. ... My outstanding problem was to create a valid ByteArray from no matter what file as I previously used the ByteArray coming from ImageReader. ...
    (comp.lang.smalltalk)
  • Re: NLS_LANG
    ... it can't be done from within the Oracle server. ... A client pretending to use the same character set as the database, ... Of course it is sometimes correct to have client encoding ...
    (comp.databases.oracle.tools)
  • Re: utf8 encoding problem
    ... version/patches/Oracle client system enviornment etc. ... There were a large number of improvements in UTF encoding since 1.12 so my ... The UTF bug like this could be caused by the Oracle cleint or the Oracle ... > name and update the same in the database. ...
    (perl.dbi.users)
  • Re: utf8 encoding problem
    ... Oracle version/patches/Oracle client system enviornment etc. ... There were a large number of improvements in UTF encoding since 1.12 so my only sugestion is for you to install DBD::Oracle 1.19 locally on a seperate machine and then test to see if the bug continues. ... The UTF bug like this could be caused by the Oracle cleint or the Oracle DB as well and not just DBD::Oracle. ... name and update the same in the database. ...
    (perl.dbi.users)