Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> extended ascii codes

extended ascii codes

From: Bill Becker <beckerb_at_mfldclin.edu>
Date: Tue, 14 Aug 2001 14:28:53 -0700
Message-ID: <F001.0036A5F6.20010814122657@fatcity.com>

Hello,

We are running Oracle 8.1.6 on Solaris 2.7. The characterset for our database is US7ASCII, as evidenced by:
TS1>SELECT * FROM NLS_DATABASE_PARAMETERS;

PARAMETER                      VALUE
------------------------------ ----------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA
NLS_CURRENCY                   $
NLS_ISO_CURRENCY               AMERICA
NLS_NUMERIC_CHARACTERS         .,
NLS_CHARACTERSET               US7ASCII
NLS_CALENDAR                   GREGORIAN
NLS_DATE_FORMAT                DD-MON-YYYY
NLS_DATE_LANGUAGE              AMERICAN
NLS_SORT                       BINARY
NLS_TIME_FORMAT                HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZH:TZM
NLS_DUAL_CURRENCY              $
NLS_COMP                       BINARY
NLS_NCHAR_CHARACTERSET         US7ASCII
NLS_RDBMS_VERSION              8.1.6.3.0

Now, when using US7ASCII, I don't understand how I can do this:

TS1>desc biltmp

 Name                                     Null?    Type
------------------------------------- -------- ----------------------------
GENDER                                            VARCHAR2(1)
AGE                                               NUMBER(3)

TS1>insert into biltmp (gender)
 values (CHR(176));

1 row created.

TS1>insert into biltmp (gender)
 values (CHR(248));

1 row created.

TS1>commit;

Commit complete.

TS1>SELECT GENDER, ASCII(GENDER) FROM BILTMP; G ASCII(GENDER)
- -------------

ø           248
°           176

The symbols seen above in the first column are not what I see in sqlplus, but cutting and pasting into this msg apparently converts them to the symbols above. My mail app is Windows-based, and the codeset used is apparently the same as the WE8ISO8859P1 codeset. What I see in sqlplus are the symbols that the extended ascii IBM codeset uses (248 is the small circle, 176 is a vertical rectangle filled with dots - hope I'm not getting too technical). Don't know what they will display as when I send this to oracle-l.

Anyway, why can I insert ascii values above 127 into an US7ASCII database?
In a US7ASCII database, does (server-side) sqlplus actually interpret all 8 bits for values above 127 as the extended ascii IBM codeset?

Interestingly, from client sqlplus (8.0.6);

TS1>SELECT GENDER, ASCII(GENDER) FROM BILTMP; G ASCII(GENDER)
- -------------

x           248
0           176

Here, it apparently ignores the 8th bit (248 - 128 = 120, lower-case x).
(176 - 128 = 48, zero), so I conclude that net80 somehow knows
that the database characterset is 7-bit, and ignores the 8th bit. Is that conclusion correct?
Is net80 responsible for this conversion, and is there any way I can tell it to interpret all 8 bits, short of changing the characterset of the database?

To everyone who has read this far, thanks. To all who respond, even greater thanks.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Bill Becker
  INET: beckerb_at_mfldclin.edu

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Tue Aug 14 2001 - 16:28:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US