From: Jukka K. Korpela (jkorpela@cs.tut.fi)
Date: Fri Jan 13 2006 - 15:23:12 CST
On Fri, 13 Jan 2006, Kit Peters wrote:
> Can someone provide me a definitive list of all Unicode digits?
Oops, my previous answer had a programming error. If you use the
UnicodeData.txt file for this, you need to check for the 8th
field being _nonempty_, so the proper condition is $entry ne '':
$dbfile = 'UnicodeData.txt';
open(DB,"<$dbfile") || die "Can't open database file $dfile $!";
while(<DB>) {
@entry = split(';',$_);
if($entry[7] ne '') {
print $entry[0], " ", $entry[1], "\n"; }}
It also occurred to me that maybe the "digit" concept is not quite what
you are after. If you are testing a routine for parsing numeric input,
then (depending on the definition of the input routine's purpose)
you might need to have it accept all numeric characters, e.g.
the vulgar fraction ½, Roman numerals, etc.
-- Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/
This archive was generated by hypermail 2.1.5 : Fri Jan 13 2006 - 15:24:54 CST