Database Reference
In-Depth Information
Now, if I go to another window and specify a 7-bit ASCII client, I'll see quite different results:
$ export NLS_LANG=AMERICAN_AMERICA.US7ASCII
$ sqlplus eoda
Enter password:
EODA@ORA12CR1> select data, dump(data) dump from t;
D DUMP
- --------------------
a Typ=1 Len=1: 224
a Typ=1 Len=1: 225
a Typ=1 Len=1: 226
Notice how in the 7-bit session I received the letter “a” three times with no diacritical marks. However, the DUMP
function is showing me that in the database there are, in fact, three separate distinct characters, not just the letter “a.”
The data in the database hasn't changed—just the values this client received. If this client were to retrieve that data
into host variables as follows:
EODA@ORA12CR1> variable d varchar2(1)
EODA@ORA12CR1> variable r varchar2(20)
EODA@ORA12CR1> begin
2 select data, rowid into :d, :r from t where rownum = 1;
3 end;
4 /
PL/SQL procedure successfully completed.
And then next, do nothing whatsoever with it, just send it back to the database:
EODA@ORA12CR1> update t set data = :d where rowid = chartorowid(:r);
1 row updated.
EODA@ORA12CR1> commit;
Commit complete.
I would observe in the original 8-bit session that I have lost one of the original characters. It has been replaced
with the lowly 7-bit a , not the fancy à I had previously.
EODA@ORA12CR1> select data, dump(data) dump from t;
D DUMP
- --------------------
a Typ=1 Len=1: 97
á Typ=1 Len=1: 225
â Typ=1 Len=1: 226
 
Search WWH ::




Custom Search