Link to home
Start Free TrialLog in
Avatar of Mahmoud Al Jundi
Mahmoud Al JundiFlag for Jordan

asked on

change language for non unicode programs and oracle

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
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mahmoud Al Jundi

ASKER

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.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

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.
NOTEPAD.JPG
TEST.txt
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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 !!
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.