Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2010
    Posts
    2

    Unanswered: Oracle Encoding Issue

    Hi,

    I have been facing problems in regards to charset which is set to AL32UTF8 on the Oracle database instance.

    Datastage(ETL) is loading data in oracle database using NLS_LANG=AMERICAN_AMERICA.AL32UTF8

    The problem occurs after loading fraction characters( ½ ). Datastage loads it fine in the oracle database. When I try to view the same data using TOAD or Squirrel Client I see it as junk characters.

    TAKE 1� TO 2 TS BY MOUTH AT BEDTIME

    However using SQL plus when we do

    export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

    and then fire the sql query I am able to see the fraction character.
    -------------------------------------------------------------------------

    I have tried setting NLS_LANG as a environment variable in my windows, but still I see junk characters.

    --------------------------------------------------------------------------
    To Add on further I tried inserting fraction characters using UTF-8 encoding and was able to insert and retrieve without any problems

    1. This one using UTF-8

    GIVE ½ TAKE ONE TABLET EVERY_1 HOURS Typ=1 Len=37 CharacterSet=AL32UTF8: 47,49,56,45,20,c2,bd,20,54,41,4b,45,20,4f,4e,45,20 ,54,41,42,4c,45,54,20,45,56,45,52,59,5f,31,20,48,4 f,55,52,53

    2. This one using AL32UTF8

    TAKE 1� TO 2 TS BY MOUTH AT BEDTIME Typ=1 Len=35 CharacterSet=AL32UTF8: 54,41,4b,45,20,31,bd,20,54,4f,20,32,20,54,53,20,42 ,59,20,4d,4f,55,54,48,20,41,54,20,42,45,44,54,49,4 d,45

    If you have a closer look using AL32UTF8 fraction character is represented by single byte(bd) and using UTF8 it is represented by two bytes(c2 bd)


    The objective is to see these fraction characters through my java program.

    Any help of directions would be appreciated.

    Configurations:
    Oracle Database 11g

    Regards
    Atul
    Last edited by prabhuatul; 01-09-10 at 20:51. Reason: Formtting

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >The objective is to see these fraction characters through my java program.
    Since the data is OK within the DB, you have a data presentation issue with your client.
    Since client is yours & yours alone, the fix is yours alone also.

    Your client system and software must be properly configured to properly display the data.

    SORRY!
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jan 2010
    Posts
    2

    Encoding Issue

    Yes..I agree..

    But I am not able to figure out what changes needs to be done at client end

    Could you please let me know?

    Regards
    Atul

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >The objective is to see these fraction characters through my java program
    I don't do Java, sorry.

    FWIW - another way to verify DB contents is to use ASCIISTR() function.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Quote Originally Posted by prabhuatul View Post
    The objective is to see these fraction characters through my java program
    What kind of program? Web application or desktop (Swing)?
    Can you retrieve the UTF8 characters with a JDBC/Java based SQL tool (like SQL Developer)?

    But as this indeed sounds like a pure programming problem you should take the question (including a detailed description of your program and how it handles the data) to a Java forum.

  6. #6
    Join Date
    Jan 2010
    Posts
    2
    utf8 is subset,al32utf8 is superset.the original characterset is al32utf8 can't be converted to the utf8

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >utf8 is subset,al32utf8 is superset.the original characterset is al32utf8 can't be converted to the utf8

    What does any of this have to do with Oracle RDBMS?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  8. #8
    Join Date
    Jan 2010
    Posts
    2
    Quote Originally Posted by anacedent View Post
    >utf8 is subset,al32utf8 is superset.the original characterset is al32utf8 can't be converted to the utf8

    What does any of this have to do with Oracle RDBMS?
    I am finding the solution still.I just rebuilded the oracle instance when I meet this issue last time.If you solve this problem, tell you please.

Tags for this Thread

Posting Permissions

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