dazzyb has asked for the wisdom of the Perl Monks concerning the following question:
Currently have a database on solaris using the us7ascii charset.
I'm in the process of upgrading but charset is now we8iso8859p1.
The problem is I have a password de-cryption routine that causes wide character problems. I have set the NLS_LANG, ORA_NLS32 environment variables but to no avail.
Anyone point me in the right direction?
The oracle metadata has been exported/imported into a new database using the us7ascii charset.
I'm using Perl 5.8.0 upgraded from 5.00503. The main thrust of the decryption is chr() which gives me the expected results on the old version of Perl.
Wide character is not a valid character within the ASCII code.
Seems that on the old version of Perl if you called chr(336) this would return P in 5.00503 but 5.8.0 returns some control character.
The fix was staring me in the face. Check the return value and subtract 256 (0->255 vaild ascii) if greater than 255. Seems to be OK now that I have a database using the US7ASCII charset and the correct environment settings.
Still have the problem with the we8iso8859p1 charset but I think this could be data conversion during import.
Edit by jdporter: Changed title from 'DBI::Oracle'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: charset problem with Oracle
by etcshadow (Priest) on Feb 11, 2004 at 04:51 UTC | |
|
Re: charset problem with Oracle
by graff (Chancellor) on Feb 11, 2004 at 01:23 UTC |