File:  [Local Repository] / db / prgsrc / common.pl
Revision 1.2: download - view: text, annotated - select for diffs - revision graph
Wed Oct 31 03:07:18 2001 UTC (22 years, 6 months ago) by boris
Branches: MAIN
CVS tags: HEAD
KOIfication and Unixation...

    1: #!/usr/bin/perl
    2: 
    3: ################################################################
    4: ########## стандартные заклинания, которые должны быть везде.###
    5: ################################################################
    6: 
    7: 
    8: $rl=qr/[йцукенгшщзхъфывапролджэячсмитьбюё]/;
    9: $RL=qr/[ЙЦУКЕНГШЩЗХЪЭЖДЛОРПАВЫФЯЧСМИТЬБЮЁ]/;
   10: $RLrl=qr/(?:(?:${rl})|(?:${RL}))+/;
   11: $l=qr/(?:(?:${RLrl})|(?:[\w\-]))+/;
   12: $Ll=qr/(?:[A-Z])|(?:${RL})/;
   13: 
   14: 
   15: 
   16: 
   17: 
   18:   my ($thislocale);
   19:   if ($^O =~ /win/i) {
   20: 	$thislocale = "Russian_Russia.20866";
   21:   } else {
   22: 	$thislocale = "ru_RU.KOI8-R"; 
   23:   }
   24:   POSIX::setlocale( &POSIX::LC_ALL, $thislocale );
   25:   if ((uc 'а') ne 'А') {die "!Koi8-r locale not installed!\n"};

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>