Home » Other » Client Tools » Sqlplus and Arabic characters
Sqlplus and Arabic characters [message #250088] Sat, 07 July 2007 16:20 Go to next message
Upperm
Messages: 95
Registered: July 2003
Member
Hello folks,

I'm using OS win2k
and I've a 9.2010 Oracle DB.

The purpose is the following:
How can I view the arabic characters while using SQLPLUS?

Thanks for any help.

Re: Sqlplus and Arabic characters [message #250092 is a reply to message #250088] Sat, 07 July 2007 16:57 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>How can I view the arabic characters while using SQLPLUS?
This NOT really a SQL*Plus issue, but the OS upon which it runs.

Your question "assumes" the arabic characters are actually & correctly stored in the database; which may or may not be the case.

[Updated on: Sat, 07 July 2007 17:09] by Moderator

Report message to a moderator

Re: Sqlplus and Arabic characters [message #251239 is a reply to message #250092] Thu, 12 July 2007 13:42 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
First, you need to prove that Windows can display the characters using something simple like notepad. This example (using DOS sqlplus) shows how to display Euro sign on a typical US Windows machine.

--=================================================================
Euro is CHR(14844588) (U+20AC)
--=================================================================
1.) Set NLS_LANG in registry for current Oracle Home to something having a Euro
 e.g. AMERICAN_AMERICA.WE8MSWIN1252

-- trick to show NLS_LANG used in current sqlplus run. Ignore the error
-- just look at the NLS setting reported

SQL> @%NLS_LANG%
SP2-0310: unable to open file "AMERICAN_AMERICA.WE8MSWIN1252"

-- Default DOS codepage 437 (Euro sign display test fails)
2.) C:\>chcp
Active code page: 437

C:\>sqlplus usr/pass@db

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Oct 7 14:27:37 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
With the Partitioning option
JServer Release 8.1.7.2.0 - Production

SQL> select CHR(14844588), dump(CHR(14844588)) from dual;

CHR DUMP(CHR(14844588))
--- ------------------------
Ç   Typ=1 Len=3: 226,130,172   <<=== Incorrect display (default codepage 437)


-- change to Windows codepage 1252 (Euro sign display test works)
3.) C:\>chcp 1252
Active code page: 1252

4.) Set font in DOS window to Lucida Console (it contains Euro)

5.) C:\>sqlplus usr/pass@db

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Oct 7 14:28:21 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to:
Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production
With the Partitioning option
JServer Release 8.1.7.2.0 - Production

6.) SQL> select CHR(14844588), dump(CHR(14844588)) from dual;

CHR DUMP(CHR(14844588))
--- ------------------------
¤   Typ=1 Len=3: 226,130,172   <<=== Correct display (codepage 1252)



Previous Topic: FORMATTING BULK OF FILES AT A TIME
Next Topic: Executing a procedure which has a cursor as an 'OUT' parameter
Goto Forum:
  


Current Time: Sun Dec 22 20:38:40 CST 2024