mathmatical calculation in nepali unicode traditional in vb.net 2005

242 views
Skip to first unread message

purnima

unread,
Nov 18, 2007, 7:37:10 AM11/18/07
to Unicode Nepali User's Group
how can we do mathmatical calculation from vb.net 2005 through nepali
unicode traditional.

our problem is

textbox1.text=val(textbox2.text)+val(textbox3.text)


it gives result 0 ie zero

Aaniyo

unread,
Nov 20, 2007, 12:57:48 AM11/20/07
to Unicode Nepali User's Group
Hi,

I think you have to convert the nepali unicode number into western
number before you do any calculations. I haven't done such programming
so far but i can guess it how it works in Excel 2007. When you type
nepali number in an excel cell, it shows corresponding number english
on the formula bar. If you type nepali number in the formula bar, it
automatically converts it into english number. You cannot do
everything with nepali unicode in programming. For example you can not
make variable names in nepali. So is calculations.

I hope this will be helpful for you.

Aaniyo

Nani Hera Shakya

unread,
Nov 20, 2007, 8:21:09 PM11/20/07
to unicod...@googlegroups.com
Hi Aaniyo ji,
 
Thanks for your guidlines.I will try it.
 
Bye.

 

vishnu subedi

unread,
Nov 23, 2007, 2:24:40 AM11/23/07
to unicod...@googlegroups.com
Also i want to know about it. If you have any idea, write me ok. 

Send instant messages to your online friends http://uk.messenger.yahoo.com

Aaniyo

unread,
Nov 28, 2007, 7:46:38 AM11/28/07
to Unicode Nepali User's Group
I have developed a simple application which can do calculation and
display numbers in Nepali. It can mimic that calculation is being done
in Nepali.

It is created in Visual Studio 2005 using C#. Hope VB folks also find
it useful.

You can find the project here: http://groups.google.com/group/foss-nepal/web/WindowsApplication1.zip

If you have any better idea let me know.

Aaniyo

On Nov 23, 4:24 pm, vishnu subedi <bisesh_bis...@yahoo.com> wrote:
> Also i want to know about it. If you have any idea, write me ok.
>

Aaniyo

unread,
Nov 27, 2007, 10:07:25 PM11/27/07
to Unicode Nepali User's Group
Hello group,

Nepali Unicode Traditional is just another human interface for
entering Unicode data into the computer. So, whether you use
Traditional Unicode Nepali or Romanized Unicode Nepali or Devanagari
Inscript (which is the de-facto standard on Windows system) doesn't
make any difference for calculation. These input systems are just
human interfaces. You can use whichever input system you feel
comfortable with. But all will be treated equally by the computer
system.

I'm giving you an example in C# I hope you can use the idea in VB:

the following is wrong:
int a = १;
int b = २;
int c = a + b;

Convert the Unicdoe Nepali characters into ASCII english numbers and
do the calculations:
char ek = '१';
char dui = '२';
double a = Char.GetNumericValue(ek);
double b = Char.GetNumericValue(dui);
double c = a * b;
textBox3.Text = c.ToString();

The textBox3 will show the multiplied number in English. Before
showing it there you may want to convert it back to Nepali. I'm still
working on how to do it. If you are interested, you have to know how
to play with the System.Text.Encoding classes and its two main
properties:
'System.Text.Encoding.ASCII',
'System.Text.Encoding.Unicode'.

Understand the Unicode mapping of Nepali numbers. The concept is
similar to mapping of a english number 0 to ascii 48 or (30 in hex)
Unicdoe 0966 -> ०
Unicode 0967 -> १
.
.
Unicode 096F -> ९

If you can convert Nepali zero to English zero, you can do it with
other numbers too. So you first learn the details of Nepali zero from
here:
http://www.fileformat.info/info/unicode/char/0966/index.htm

I'm also a beginner in this area. Let me know what you can progress.

Aaniyo


On Nov 23, 4:24 pm, vishnu subedi <bisesh_bis...@yahoo.com> wrote:
> Also i want to know about it. If you have any idea, write me ok.
>
Reply all
Reply to author
Forward
0 new messages