Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to save arabic and English in database?

Poor-BoyApr 28 2017 — edited Apr 30 2017

Hi Guys i want to save Arabic & ENglish both in my Database Table ... For example i have Table "Arabic" with 2 Columns (1)Urdu (2) ENglish

In Urdu COlumn i want to save just Arabic

and in English column i just want to save english

I Set My All regedit NLS_Lang=AMERICAN_AMERICA.AR8MSWIN1256

And i set my system enable Arabic and english both languages..

i can write Arabic on wordpad when i press ALT+Shift..

But i can't write arabic in SQL ... whats the issue?

This post has been answered by Sergiusz Wolicki-Oracle on Apr 30 2017
Jump to Answer

Comments

BluShadow

But i can't write arabic in SQL ... whats the issue?

What interface are you using to write your SQL in?  Is that interface configured to use a characterset that supports the languages you want?

I don't know all the different charactersets myself, but are you sure AMERICAN_AMERICA.AR8MSWIN1256 supports both Arabic and English?  Looks to me like it's more likely to just support 8 bit (single byte) characters and the American/English languages.

Mustafa KALAYCI

addition to BluShadow, does your database also support arabic or urdu chars?

can you post the result for this:

create table tmp_data (d nvarchar2(2000));

insert into tmp_data

select unistr('\FEB4') from dual;

select * from tmp_Data;

Poor-Boy

yes you can see the result

s.png

Poor-Boy

OraFAQ Forum: Forms » How to use unicode in Developer

I just saw this thread where mentioned that AMERICAN_AMERICA.AR8MSWIN1256. Support arrabic and ENglish

s.png

Mustafa KALAYCI

Hi,

output is not correct result, it should be this char:    ﺴ

I am not sure if sqlplus list it, can you try it from an GUI tool like SQL Developer please?

also setting NLS parameter doesn't mean your Operation System can handle these character. if OS doesn't support these charset then you won't be able to send it to Oracle as far as I know.

Poor-Boy

Now i tried in PLSQL Developer check the result

pastedImage_0.png

Mustafa KALAYCI

so you can use unistr to insert any kind of data as far as I understand. if you want to insert data in quotes like:

insert into table values ('ﺴ');

it won't happen because when you use it in between quotes, it will be converted to the string which probably will not be supported with your charset. what data do you want to insert? will this be done in regular basis?

Poor-Boy

Actualy in a software many tables and in every table there is 2 or 3 column where user will put information in arabic via Form...

When i try to insert Data Arabic via form 6i its saving but when i retrive data its showing like ??????????.

Please, provide the result of the following query in your database:

SELECT USERENV('language') FROM DUAL;

Also, do you use Forms6i client/server or web?

AR8MSWIN1256 does support Arabic and English though Oracle recommends AL32UTF8 (UTF8 in case of the old Forms6i).

Thanks,
Sergiusz

Poor-Boy

I am using 6i dekstop version not web based sir... and yes you can check the result of query

pastedImage_0.png

Poor-Boy

Now i change my NLS_CHaracter into

pastedImage_0.png

Now i change my NLS_CHaracter into

How do you change it?

-- Sergiusz

Srini Chavali-Oracle

Using the command "ALTER DATABASE CHARACTER SET ...." is not supported - it will corrupt your database beyond repair.

The official process to do so is documented - https://docs.oracle.com/cd/E11882_01/server.112/e10729/ch11charsetmig.htm#NLSPG011

Poor-Boy

Here you can see how can i changed nls_character

$ sqlplus / as sysdba

SQL> SHUTDOWN IMMEDIATE;

SQL> STARTUP MOUNT;

SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;

SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE;  -- For RAC Node Only

SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;

SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;

SQL> ALTER DATABASE OPEN;

SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;

SQL> SHU IMMEDIATE

SQL> STARTUP

Poor-Boy

80% Problem is resolve now i can save and retrive Arabic & English Both .... But I can't write Arabic auto.. i have to press ALT+SHIFT to change the language..

for example

i make a table with 2 Columns

English Varchar2(100) for saving english

Urdu Varchar2(100)      for saving Arabic

English is default when i click on Urdu COlumn i have to Press ALT+Shift to change my system writing into urdu

First, the procedure you described is not valid for migrations from WE8... to AL32UTF8. It corrupts all CLOBs in the database. It does not convert any existing data. Second, AL32UTF8 may work incorrectly with Forms6i. Forms6i are based on Oracle Client 8.0.6 and this client version does not know AL32UTF8. You should use the older, now deprecated, UTF8.

Second, to set the keyboard to Arabic when focusing an item, set the Initial Keyboard State item property to Local.

Thanks,
Sergiusz

Poor-Boy

There is no existing Data and dont need to convert it sir. and form 6i working very fine. i checked

and i already set Initial keyboard but still i have to press ALT+SHIFT to write urdu... english is default.. check here my setting

ol.png

Why have you set this for the ENG item?  Have you tested with the ENG item as well?

As you have used an illegal procedure on your database, your database is now formally unsupported. If you call Oracle Support with a database issue, you may be asked to reproduce the problem on a database that was not converted using the presented method.

Thanks,
Sergiusz

Poor-Boy

i set this for arabic language sir not for English. but still not works

Answer

I asked because your screenshot says "Item: ENG". If the property does not work, then there may be a bug or you use a Windows version that is too new for Forms6i. Do you have the latest Forms6i patch? I think it is patch 19 (Forms 6.0.8.28).

Also, have you tried leaving only the Urdu language installed, however with Urdu and US keyboard layouts?

Urdu.png

In case there is a bug or the Windows version is too new, then the only solution I could think of is to write a small DLL with a function to switch the keyboard mode via Windows API, and call this function via ORA_FFI when entering the item.

Thanks,
Sergiusz

Marked as Answer by Poor-Boy · Sep 27 2020
1 - 20
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 28 2017
Added on Apr 28 2017
20 comments
15,594 views