Can not display Arabic string stored in resource file

ajewahar

Member
Joined
Mar 14, 2005
Messages
15
Location
sa
Programming Experience
10+
Hi,.
Have created a .resource file which contain number of records . The entries are basically strings in Arabic and English.

Based on user Language selection from my application, I will be replacing all lable text propertry from the values from .resources file.

I have managed to save the resource file using page code (unicode) 1256.

But, Arabic text stored in the resouce file is not displaying (i tried message
box) as Arabic text. It display as garbage characters. But, in the resource it remain as Arabic text.

Any idea how to resolve this issue.

Appreciate your help
 
When I did a simple test with some arabic text in resource it worked right out the box without any special tricks, see the attached project. Arabic displays fine in resource value field, a messagebox and label text.
 

Attachments

  • vbnet11-ArabicResource.zip
    7.3 KB · Views: 260
HI

I have another issue.

I have 2 command button in my all forms user to select "English" and "Arabic" language. Arabic Command Button Text property I have setup عربي

But, this Arabic text written in the command button text property being displayed as "garbage character" each every I open the project after shut-off.

I remember, while saving the from where I have arabic characters, system has warned to save the file unicode charcater. I choose option "saved as" and selected "Arabic windows unicode 1256". May be this not correct unicode !.

Appreciate your help..

Thanks in dvance..
 
From the little I have read about arabic and VB.Net you are supposed to put all arabic text into a resource file and load from there every time. If you place it in form button text it will be saved in another charset and lost. I'm aware of the advanced SaveAs with Arabic 1256 option, but when loading it is still codepage 1252 (here at least). Loading arabic text from resource into button works fine just as the other examples of the attached project above.

This site states you can do it directly on button, but it didn't work when I tested Visual Studio .NET With Arabic Language Support
 
Last edited:
Back
Top