Convert-Number-Digits

Convert Digits Between the Scripts of Unicode

SYNOPSIS

  use utf8;
  require Convert::Number::Digits;

  my $number = 12345;
  my $d = new Convert::Number::Digits ( $number );
  print "$number => ", $d->toArabic, "\n";

  my $gujarti = $d->toGujarti;
  my $khmer = reverse ( $d->toKhmer );
  $d->number ( $khmer );  # reset the number
  print "$number => $gujarti => ", $d->number, " => ", $n->convert, "\n";

DESCRIPTION

The Convert::Number::Digits module will convert a sequence of digits from one script supported in Unicode, into another. UTF-8 encoding is used for all scripts.

METHODS

CAVAETS

Ethiopic, Roman and Tamil scripts do not have a zero. Western 0 is used instead.

Though a script has digits its numeral system is not necessarily digital. For example, Roman, Coptic, Ethiopic, Greek and Hebrew. If you convert digits into these systems it is assumed that you know what you are doing (and your starting number is an applicable sequence). The Convert::Number::Digits package converts digits and not numbers.

REQUIRES

The package is known to work on Perl 5.6.1 and 5.8.0 but has not been tested on other versions of Perl by the author.