From: vainateya (email@example.com)
Date: Fri Feb 19 2010 - 06:57:47 CST
We are facing problems with operating with numerals from various code pages.
Are there any available standards, to which applications, databases,
programming environments, etc. must comply,
while handling Numbers in different scripts,
including - processing Arithmetic operations, Logical operations with such
case 1 - Basic math operations (+, - , / , * ) when both params are from
non ascii numerals
- is such processing allowed or not.
- if digits across scripts are to be treated as
programmatically equivalent, then result will be in which script?
case 2 - logical comparison operators across scripts :
eg: if n < m do something
// (for simplifying, lets assume both as character
variables / single digits)
with n = 4 m = 5 should succeed
however it might fail if n is hindi numeral 4 and m
is english 5 (ASCII = 53), simply because of ascii / rather unicode value of
hindi numeral 4 is greater.
if m == 0
return (cannot divide by zero)
output n /m
This gets handled by environment where ascii value of 'm'
ASCII = 48 is compared not ASCII = 0 - but using which standard / rule does
the programming environment behave this way.
What's the behaviour when m is a 0 from some other script /
Similar problems arise while sorting such data.
case 3 - things get more complex if we are dealing with complex datatypes
such as date and time,
eg : routine checks gets system time and checks if it past 5:00 pm
but if the system / locale settings or related service, return
the time in local language, then condition may fail.
Different programming environments and applications seem to treat such
scenarios differently, most seem to expect an application level code /
routine which maps to equivalent ASCII before further processing or database
Are there any standards / locale settings that help in determining the
Mr. Vainateya Koratkar
C-DAC GIST Pune.
-- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
This archive was generated by hypermail 2.1.5 : Fri Feb 19 2010 - 07:02:02 CST