Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2005
    Posts
    127

    Unanswered: Insertion of the Character set

    Hi all,

    I came across a non keyboard character in the Oracle database (9i) and when i queried table column with the following query

    Code:
    SELECT asciistr(col1) from test1;
    I got the output as \FFFD.

    How could i insert the same character in my Oracle environment using the ascii code of the character viz., \FFFD

    I tried inserting with the followin insert query,

    INSERT INTO TEST1 VALUES ('\FFFD')

    but it inserted the above ascii codes as a character string rather than the special character.

    Kindly advice on this.

    Please note that my Oracle version is 9i and its character set is WE8ISO8859P1.
    Last edited by Shefu; 05-14-07 at 02:27.

  2. #2
    Join Date
    Apr 2005
    Posts
    127
    Hi ,

    any updates on my above query..

    Shefu

  3. #3
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    The code you get is the UTF-16 representation of this special character, because ASCIISTR displays non pure ASCII characters as their UTF-16 hexadecimal code. Yet, this character may very well be printable (like , , ...). What if you simply try :
    Code:
    SELECT col1 from test1;
    ???

    BTW, you say your db charset is WE8ISO8859P1, what is your client charset ? Have you configured your NLS_LANG environment variable correctly ? (like AMERICAN_AMERICA.WE8ISO8859P1 for example)

    rbaraer
    ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .

  4. #4
    Join Date
    Apr 2005
    Posts
    127
    thanks for the reply rbaraer, The below query

    Code:
    SELECT col1 from TEST1
    returned the value ,

    Code:
    ˜
    I found the equivalent ascii values for the special characters to be /FFFD and /02DC. However I want to insert the above character using its equivalent ASCII CHARACTER.

    Regards,
    Shefu

  5. #5
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    /FFFD and /02DC are NOT ASCII representations of this character, simply because there is NO ASCII representation. This is a special character that is included in some extended ASCII charsets such as WE8ISO8859P1, but it is not an ASCII character. ASCII characters are the ones coded only with the first 7 bits (that is from 0 to 127), this one is not.

    I don't know for /02DC, but /FFFD is the UTF-16 (fixed 2 bytes UNICODE) representation of this character, that is why it is returned so by ASCIISTR.

    Why simply inserting this character, specifying that your client character set is WE8ISO8859P1, does not suit you ?

    rbaraer
    ORA-000TK : No bind variable detected... Shared Pool Alert code 5 - Nuclear query ready .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •