1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

ASCII in oracle 11g

Discussion in 'Server Administration and Options' started by swati, Dec 22, 2014.

  1. swati

    swati Guest

    I have two oracle 11g databases.
    I am checking special character 'é' in both.
    In UTF16 database, if I select the value from table, I get ASCII code as 233 but if I directly query the special character , it shows 50089.
    In UTF8 database, its 50089 in all the cases.
    From where first database is showing 233 value?


    Database1 is AL16UTF16.
    -----------------------
    select chr(233) from dual; --> null
    select chr(50089) from dual; --> é
    select ascii('é') from dual; --> 50089
    select ascii(substr(product_desc,2,1)) from htg_product_service where pr_level = 6; --> 233

    Database2 is UTF8.
    ------------------------
    select chr(233) from dual; --> null
    select chr(50089) from dual; --> é
    select ascii('é') from dual; --> 50089
    select ascii(substr(productdescription,2,1)) from prdservice.init_prod_setup_reqd_attrib where productcode = 'dowe64'; --> 50089
     
  2. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,347
    Likes Received:
    348
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    If you are using UTF8 as the character set you should really be using AL32UTF8 as it provides all of the current extensions and characters that the original UTF8 does not. This may be why you are seeing such 'strange' behavior.
     
  3. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    Name Description Comments
    AL16UTF16 Unicode 3.2 UTF-16 Universal character set MB, EURO, FIXED
    AL32UTF8 Unicode 3.2 UTF-8 Universal character set MB, ASCII, EURO
    UTF8 Unicode 3.0 UTF-8 Universal character set, CESU-8 compliant MB, ASCII, EURO
    UTFE EBCDIC form of Unicode 3.0 UTF-8 Universal character set (UTF-EBCDIC) MB, EURO
     
  4. Amruta

    Amruta Starter

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    10
    Location:
    Inida
    I have a Oracle database 11g, which has NLS_Characterset ad AR8ISO8859P6.
    This supports arabic text but does not support Ascii character171, 187 etc. Andthe DB sits on an Unix server. Can you please help me out as what should I do to be able to insert chr(171).
     
  5. krasnoslobodtsev_si

    krasnoslobodtsev_si Forum Genius

    Messages:
    626
    Likes Received:
    129
    Trophy Points:
    810
    Location:
    Russian Federation
    what task at you?

    what coding on database ?

    what coding on client side?

    if database not coding utf ,then the best candidate solution would be to migiration database on the coding UTF...
     
    Last edited: Aug 11, 2015