Avatar of m_jundi
m_jundi
Flag 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
Oracle DatabaseDatabasesWindows Server 2003

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Pavel Celba

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
m_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 !!!
Pavel Celba

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.
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?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
m_jundi

ASKER
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
slightwv (䄆 Netminder)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Pavel Celba

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.
m_jundi

ASKER
slightwv, sounds oracle 8i does not support nvarchar2 !!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
slightwv (䄆 Netminder)

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.