--- db/prgsrc/eq/Attic/findequal.pl 2001/05/18 01:37:51 1.1 +++ db/prgsrc/eq/Attic/findequal.pl 2001/05/18 22:53:03 1.8 @@ -32,8 +32,29 @@ use POSIX qw (locale_h); do "common.pl"; +my ($thislocale); +if ($^O ~= /win/i) { + $thislocale = "Russian_Russia.20866"; +} else { + $thislocale = "ru_RU.KOI8-R"; +} +POSIX::setlocale( &POSIX::LC_ALL, $thislocale ); +if ((uc 'Á') ne 'á') {die "!Koi8-r locale not installed!\n"}; +} + + +if ((uc 'Á') ne 'á') {die "!Koi8-r locale not installed!\n"}; + +print "before checktable"; + + if (checktable('equalto')) {die "The table equalto exists. You must delete it first!\n"}; +if ((uc 'Á') ne 'á') {die "!Koi8-r locale not installed!\n"}; + +print "before mydo"; + + print "Creating equalto table...\n"; mydo("CREATE TABLE equalto ( @@ -44,10 +65,13 @@ print "Creating equalto table...\n"; or die "Can't create equalto table: $!\n"; +if ((uc 'Á') ne 'á') {die "!Koi8-r locale not installed!\n"}; +print "before getbase"; getbase(QuestionId,Question); +print "after getbase"; print "Loading questions...\n"; @@ -60,7 +84,7 @@ while ((($id, $a) = getrow), $id) $a=~s/³£pPHXxAaBEe3KMoOT/åÅÒòîèÈáÁ÷åÅúëíÏïô/; $a=uc $a; - $a=~s/[^êãõëåîçûýúèÿüöäìïòðá÷ùæñþóíéôøâà]//g; + $a=~s/[^êãõëåîçûýúèÿüöäìïòðá÷ùæñþóíéôøâàÊÃÕËÅÎÇÛÝÚÈßÆÙ×ÁÐÒÏÌÄÖÜÑÞÓÍÉÔØÂÀ]//g; $ar[$id]=$a; $last=$id; }