Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Problem In VB.NET Windows Form Application.

Problem :

Complexity in input characters in Gujarati or any other regional language.

What I have Tried

Tried to select "SARAL FONTS" for Text boxes, but It says "Only True Type Fonts are supported." However It is supported for controls other then input e.g. Labels.

Which fonts I can use to input characters easily OR any other supporting application which is having functionality of easier input in regional languages?

Thank you.
Posted
Updated 11-Jan-13 17:16pm
v2
Comments
Sergey Alexandrovich Kryukov 11-Jan-13 22:50pm    
Not clear. Set where. By the way, many fonts support Gujarati, they don't have to be "Gujarati fonts". And not only true type fonts are supported. You do something you do not explain...
—SA
Kuthuparakkal 11-Jan-13 22:57pm    
Unclear to answer
jenitshah 11-Jan-13 23:17pm    
OK. Now I have improved the question.

There are two unrelated problems: presentation of some characters of some Unicode subset, and typing those characters using the keyboard.

Let's start from the subset and its presentation. Let's see. Wikipedia tells us that Gujarati is a separate script of Brāhmī family, that is, a writing system, relative to Devanāgarī, and is used in several languages, such as Gujarati, Gujarati, Sanskrit (I just remember that there is a variant of Sanskrit written in Devanāgarī), Kutchi, Avestan, Kutchi and Avestan. This term is used for both language and a writing system, but not the alphabet, because this writing system is the abugida, a segmental system. But what's important to us, it also specifies the Unicode subset assigned to this system:
http://en.wikipedia.org/wiki/Gujarati_script#Unicode[^].

Let us see if I can quickly type some characters and if we can see them: "અઆઇઈઉઊઋઍએઐઑઓઔકખગઘ … ૦૧૨૩૪૫૬૭૮૯". Can we see the proper character glyph? I never installed anything related to any Indian languages on my computer, as I, quite frankly, cannot understand a word in any of them (unfortunately, my bad), but I quite naively believe that if I can type and see them, you can do it, too. :-)

I'll finally see it when I post this answer.

Now, how can I see what need to support the rendering of this writing system. Simple. I usually run this application bundles with all versions of Windows: charmap.exe (Character Map). I use "Character set: Unicode"; "Group by: Unicode subrange". Of course I expected to find Gujarati as a separate subrange: I already knew that this script is so popular that it is supported by default on nearly all modern OS.

In the same application, you can see which font supports what. A standard font bundled with Windows. By the way, I'm looking at the font which is not True Type. This is OpenType:
http://en.wikipedia.org/wiki/OpenType[^].

Now, I need to explain how to type if in a convenient way. But first, I want to see how the font is rendered. So, let me post it and see. How about typing using the keyboard? Later.

—SA
 
Share this answer
 
OK, of course, Gujarati rendered perfectly. And I did not specify the font, you can see it using the default font utilized by CodeProject for the default font of text messages. Anyway, if I can do it, you can do it too.

Now, let's see how to type it in a convenient way. Usually, you go to the Control Panel applet and choose "Region and Languages", then the tab "Keyboard and Languages", then the button "Change Keyboard", then the button "Add" (may vary depending on the system, I show it for Windows 7). Not to big surprise, I found "Gujarati (India)". Mind you, I am using standard Windows 7 of the locale "English (US)". Nothing specifically Indian in it.

Again, I naively assume, that if I can do it on my Windows installed as "English (US)", you can do it anyway.

Now, the problem is: the keyboard layout installed this way, may be convenient for one or another category of Gujarati speakers or not. I don't know, but I know that some important layouts are missing.

And now — drums! — the ultimate solution:

Download this application: Microsoft Keyboard Layout Creator. Here:
http://msdn.microsoft.com/en-us/goglobal/bb964665.aspx[^].

Run it. You will see the keyboard. On each key, put the characters you want. Use [Main Menu] -> Project -> Build DLL and Setup Package. It will create some MSI files and "setup.exe". Install it. Now, miracles happen: you will find fully installed alternative keyboard layout, with Gujarati or anything else. Go back to Control Panel (described above), define how layout are switched. You are done. As I say, the ultimate solution.

India is a wonderful country with ancient culture which I deeply respect and very many different cultures and languages; I am sorry that I've never been there.

But the most mysteries experience related to India is many Indian software developers, who keep asking me how to use one or another Indian language on there computers. They ask me again and again; and I always know how to do it. I already learned so many facts about many of the languages, unfortunately, still without understanding the languages themselves. But CodeProject members from India keep asking those questions. What's wrong?

—SA
 
Share this answer
 
Encoding encoding = Encoding.GetEncoding(737); //(DOS) Greek code page
byte[] codePageValues = System.IO.File.ReadAllBytes(@"greek.txt");

// Same content is now encoded as UTF-16
string unicodeValues = encoding.GetString(codePageValues);


Debug.Log(unicodeValues);

char euro = '\u0AE7';
string test = "અઆઇઈઉઊઋઍએઐઔકખગ";
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900