insert chinese characters into utf8 database
DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: insert chinese characters into utf8 database

Hybrid View

  1. #1
    Join Date
    Jan 2000
    Posts
    387

    insert chinese characters into utf8 database

    Hi

    We need to insert chinese characters into our current utf8 database. The settings as shown below :

    PARAMETER VALUE
    ------------------------------ ------------------------------------------------------------------------------------------
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET UTF8
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    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 TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_RDBMS_VERSION 9.2.0.4.0


    I tried to copy and paste the chinese character from google for testing thru sqlplus, i got "....." only! Why is this so? I have set my NLS_LANG=AMERICAN.UTF8

    How do i insert chinese characters and view them correctly??

  2. #2
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938

    Re: insert chinese characters into utf8 database

    NLS_LANG=AMERICAN.UTF8 ?

    Should be: American_America.UTF8
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  3. #3
    Join Date
    Jan 2000
    Posts
    387
    I did an export NLS_LANG=AMERICAN_AMERICA.UTF8 and i login to sqlplus, but i am still getting "..." whenever i tried to paste chinese characters! Is there anything wrong with my settings?

  4. #4
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    It doesn't work that way.

    Use an UTF8 editor, WordPad for example and save the text there. Create an external table or use SQL*Loader.
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  5. #5
    Join Date
    Jan 2000
    Posts
    387
    I inserted the chinese characters thru SQL Loader. I can only view the chinese characters when i retrieved it from the database and displayed them on a browser. Can I actually view the chinese characters using a select statement from the sqlplus?

    What puzzled me was that i have anotehr database using characterset US7ASCII. I loaded the chinese characters and it can be viewed thru the browser too! Therefore what is the difference between UTF8 and US7ASCII??

  6. #6
    Join Date
    Jun 2001
    Location
    Helsinki. Finland
    Posts
    3,938
    You will need to use the correct NLS_LANG in the registry:

    Chinese (PRC) - SIMPLIFIED CHINESE_CHINA.ZHS16GBK
    Chinese (Taiwan) - TRADITIONAL CHINESE_TAIWAN.ZHT16MSWIN950
    Oracle Certified Master
    Oracle Certified Professional 6i,8i,9i,10g,11g
    email: ocp_9i@yahoo.com

  7. #7
    Join Date
    Jan 2000
    Posts
    387
    Thanks! I can viewed the chinese characters in the database if i activate my chinese viewer icon. Is this the right way?

  8. #8
    Join Date
    Jan 2001
    Posts
    2,828
    Originally posted by mooks
    Thanks! I can viewed the chinese characters in the database if i activate my chinese viewer icon. Is this the right way?
    what is a chineese viewer icon ? and what os are u on

    regards
    Hrishy

  9. #9
    Join Date
    Jan 2000
    Posts
    387
    For example: NJ Star Viewer (njstar.com).
    My Server OS is Redhat AS 3

    Thank you!

  10. #10
    Join Date
    Jan 2000
    Posts
    387
    Does it mean that I will always have to insert the chinese character from SQL Loader manually? No ways to insert directly into the database thru sqlplus?

Posting Permissions

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



Click Here to Expand Forum to Full Width