RE: problems getting Hebrew strings from Oracle
- From: Philip.Garrett@xxxxxxxxxxx (Philip Garrett)
- Date: Fri, 28 Apr 2006 11:47:28 -0400
-----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,execute :
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
"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.[snip]
The db encoding is logical and the linux_perl_machine is:
LANG=he_IL.UTF-8
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
.
- Prev by Date: problems getting Hebrew strings from Oracle
- Next by Date: Re: DBD::ODBC installation problem with Easysoft ODBC-Sybase driver
- Previous by thread: problems getting Hebrew strings from Oracle
- Index(es):
Relevant Pages
|