Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2004
    Posts
    4

    Unanswered: Unicode in Oracle9i

    Hi all,

    I'm learning Oracle9i, I connect to Oracle Server by isqlplus (Web Browser is IE 6.x). I like to add a row with unicode data into a table. Please review my below code:

    Create Table Employees(EmpID char(10) primary key, EmpName nvarchar2(50));

    Insert Into Employees Values('Emp01', 'Nguyễn Văn Tuấn');

    or
    Insert Into Employees Values('Emp01', n'Nguyễn Văn Tuấn');
    or
    Insert Into Employees Values('Emp01', N'Nguyễn Văn Tuấn');

    But I can't get a expected result because of the unicode string automatically translates to 'Nguy?n V?n Tu?n'

    Anybody knows how to correct this error?
    I look forward to hearing from you.

    Thanks in advance,
    TrauVang

  2. #2
    Join Date
    Nov 2002
    Posts
    833
    seems that your database has another charset installed as your client env.

    check you nls_ settings for your instance
    show parameters nls_

  3. #3
    Join Date
    Nov 2004
    Posts
    4

    Re: Unicode in Oracle9i

    hi,

    Thanks a lot for your support. Because I'm a beginner, I don't understand your guidance, You could explain more detail, please. Thanks in advance.

    Trauvang.

  4. #4
    Join Date
    Dec 2003
    Location
    ha noi
    Posts
    24

    Thumbs up

    Hi,
    There are tow things you should check:
    the first:
    - What is Your Database character set? it must support UTF8 - Unicode. I
    using AL32UTF8. When you create new database you must chouse it.
    - The second, this is on the machine that run the application, you set to display unicode character.
    + In Run menu type: regedit, press Ok
    + Find on: HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> HOME* -> NLS_LANG you change this value to "AMERICAN_AMERICA.UTF8".

    Good luck!

  5. #5
    Join Date
    Nov 2004
    Posts
    4
    Hi all,

    Should I set NLS_Characterset=UTF8? If I do so, then I can use char, varchar... datatypes to store unicode data because the datatypes is 2 byte font. If everything is 2 byte font, I think that it is very expensive!!!

    I'm an Oracle beginner, I want to receive many advices from everyone.


    Thanks in advance,
    Trau Vang.

  6. #6
    Join Date
    Dec 2003
    Location
    ha noi
    Posts
    24

    Thumbs up

    hi,
    you can refer to the link http://www.utexas.edu/its/unix/refer...01/server.920/
    for more information about character encoding in Oracle!
    good luck

  7. #7
    Join Date
    Nov 2004
    Posts
    4

    Thanks

    Hi hdninte,

    Thanks a lot.

Posting Permissions

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