narrow localization to LC_CTYPE only

This commit is contained in:
Andrey A. Chernov 1998-11-03 18:44:04 +00:00
parent e49ac6b411
commit c0a5046d0e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=14334
3 changed files with 3 additions and 3 deletions

View file

@ -37,7 +37,7 @@
- $nhhops, $local_limit, $remote_limit, $addboxes, @urllist) = ReadConfig($archivepwd); - $nhhops, $local_limit, $remote_limit, $addboxes, @urllist) = ReadConfig($archivepwd);
+ $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir); + $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir);
+ +
+$ENV{LANG}=$locale if ($locale ne ''); +$ENV{LC_CTYPE}=$locale if ($locale ne '');
+setlocale(LC_CTYPE, ""); +setlocale(LC_CTYPE, "");
+ +
+$charset = "; charset=$charset" if ($charset ne ''); +$charset = "; charset=$charset" if ($charset ne '');

View file

@ -49,7 +49,7 @@
- $nhhops, $local_limit, $remote_limit, $addboxes, @urllist) = ReadConfig($indexdir); - $nhhops, $local_limit, $remote_limit, $addboxes, @urllist) = ReadConfig($indexdir);
+ $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir); + $nhhops, $local_limit, $remote_limit, $addboxes, $vhost, $usemaxmem, $locale, $charset, @urllist) = ReadConfig($indexdir);
+ +
+$ENV{LANG}=$locale if ($locale ne ''); +$ENV{LC_CTYPE}=$locale if ($locale ne '');
+setlocale(LC_CTYPE, ""); +setlocale(LC_CTYPE, "");
+ +
+$charset = "; charset=$charset" if ($charset ne ''); +$charset = "; charset=$charset" if ($charset ne '');

View file

@ -13,7 +13,7 @@
print OUT "# CRONFILE FOR ARCHIVE IN DIRECTORY $indexdir\n\n"; print OUT "# CRONFILE FOR ARCHIVE IN DIRECTORY $indexdir\n\n";
+if (defined($locale) && $locale ne '') { +if (defined($locale) && $locale ne '') {
+ print OUT "LANG=$locale; export LANG\n"; + print OUT "LC_CTYPE=$locale; export LC_CTYPE\n";
+} +}
+ +
print OUT ('quiet=""',"\n"); print OUT ('quiet=""',"\n");