Avatar of gcook17
gcook17
Flag for United States of America asked on

VB.net Display Arabic Characters

I have an application originally written in VB6 that properly displayed Arabic characters when running in Vista OS. The application is a front end to either an Access or a SQL Server database. The user can translate the default English text for all text items in the program including Labels, menus, Button text or any screen object text as well as all messagebox text and Crystal Report literal text items. The application was recently rewritten in VB.Net 2005. Now this translated text displays multiple question marks instead of the Arabic characters. The same langauge files are loaded as were with VB6 version of application. What am I missing??
.NET ProgrammingVisual Basic.NETMicrosoft SQL Server

Avatar of undefined
Last Comment
QPR

8/22/2022 - Mon
QPR

This may be a red herring but it says here that to display them (vb.net) you should load the text into a resource file and read from there. The author has a project you can d/l and view if it helps.
Good luck
gcook17

ASKER
Thank you for your comment. It seems to be loading it but just not displaying it properly.
ASKER CERTIFIED SOLUTION
QPR

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

ASKER
Would setting the culture essentially be the same as setting regional setting in the Control Panel? Or is this a seperate application level setting needed in addition to the windows regional settings?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
QPR

is like an on the fly change for the application while it runs, not a thing that effects the whole PC
gcook17

ASKER
OK yes I understand this. The problem is it seems like it would display properly if run on a computer that was configured for Arabic chars. It does not where the VB6 version did. The computer is in use in Egypt. We have also tried in house by confirguring for Arabic through control panel. This also used to work fine in VB6 but does not in .NET 2005.
gcook17

ASKER
BTW: non unicode characters of other languages do display properly in .NET version of application so it seems to be a unicode issue. Would using a Unicode font be required? I have heard that if a font is not selected then OS chooses correct font based upon regional settings.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
gcook17

ASKER
I'll try setting culture programmatically rather than using regional setting for entire computer.
QPR

good idea, let us know how you get on
gcook17

ASKER
OK that seems to have done the job. Hre is code:

 My.Application.ChangeCulture("AR-IQ")
 My.Application.ChangeUICulture("AR-IQ")
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
QPR

Good stuff