change language for non unicode programs and oracle

m_jundi used Ask the Experts™
I have Oracle 8i installed on Windows 2003 Server and I need to change the language for non Unicode programs from Windows Control Panel from English to Arabic in order to Write Text files from Oracle DB and read properly from the server.

Does this affect Oracle DB in anyway ?

Thank you
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
No this does not affect the database in any way BUT it can affect the way how characters are converted between code pages and displayed. The conversion may happen when you update data in the database.

It will also affect other non-Unicode programs running on the PC. English should be OK, other non-English languages (except Arabic) will be displayed incorrectly in such programs.

Just test it and you'll see.


So,in order to read text files generated by oracle procedure correctly from the server , I need to to change language to Arabic ? because I saved the text file as UTF8 but characters are still not displayed correctly for Arabic.

My PC is set to Arabic and I can read text files directly generated on the sever, but when I change them from the server to utf8 and use my PC to read them , characters not displayed correctly !!!
Well this depends on the text editor you are using and also on the fonts installed on your PC.

If the text editor does not know how to process UTF-8 then you have to find another one. If Arabic fonts are not installed on the PC then you have to download them and install.

You may attach the sample of your UTF-8 text and printscreen of your editor window. It will help to recognize the problem.

Many text editors do not require to switch the language for non-Unicode programs because they are processing Unicode w/o problems.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Most Valuable Expert 2012
Distinguished Expert 2018

I'm confused here.

Are you saying you have Arabic characters stored in an Oracle database and now you want to extract the data to a file on the file system?

If so:
Are you sure the database has the characters stored correctly?  What is the database character set?
select * from nls_database_parameters;

What is the data type of the column you are extracting?

What tool/program are you using to extract the data?


Yes and I am using "utl_file" , character set is WE8ISO8859P1, data type is varchar2,

The default text file generated by the procedure is ANSI and I need it UTF8, Iam wondering if Oracle 8i - 8.1.6 able to write text data in utf8 directly ? because I am using a conversion to save it as utf8.

I can only see Arabic characters correctly only if Windows OS is set to Arabic for nonunicode programs,. The server is English.

The files attached after converting the file on the server machine to UTF8.
Most Valuable Expert 2012
Distinguished Expert 2018
I've never done this but the docs seem to point to it being possible.

Take a look at fopen_nchar:

And of course the necessary changes when writing to it like PUT_NCHAR.
Looking at the hex codes in the file Notepad shows what's inside correctly...

Either the conversion to UTF-8 was wrong or there is no conversion at all, just the UTF-8 marker (BOM) was added.

If the file shows correctly in Arabic Windows then it uses code page 1256 probably and you have to convert it once more if you need UTF-8.


slightwv, sounds oracle 8i does not support nvarchar2 !!
Most Valuable Expert 2012
Distinguished Expert 2018

Sorry.  I missed 8i in the original question.

I cannot find anything that will magically let 8i forcibly write a UTF8 file using PL/SQL.

If you still need a work-around to what you already have, I saw some Java code that claims to create a UTF8 file.  You might be able to create a Java Stored Procedure using that.

If I get some time later, I'll look around some more to see what other options I can find.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial