[LON-CAPA-cvs] cvs: loncom /auth lonlogin.pm /interface loncommon.pm /localize/localize de.pm

www lon-capa-cvs@mail.lon-capa.org
Sun, 21 Sep 2003 20:06:37 -0000


www		Sun Sep 21 16:06:37 2003 EDT

  Modified files:              
    /loncom/auth	lonlogin.pm 
    /loncom/interface	loncommon.pm 
    /loncom/localize/localize	de.pm 
  Log:
  Set document charset according to language lexicon.
  
  
Index: loncom/auth/lonlogin.pm
diff -u loncom/auth/lonlogin.pm:1.53 loncom/auth/lonlogin.pm:1.54
--- loncom/auth/lonlogin.pm:1.53	Sat Sep 20 13:44:22 2003
+++ loncom/auth/lonlogin.pm	Sun Sep 21 16:06:36 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Login Screen
 #
-# $Id: lonlogin.pm,v 1.53 2003/09/20 17:44:22 www Exp $
+# $Id: lonlogin.pm,v 1.54 2003/09/21 20:06:36 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -47,7 +47,7 @@
     my $r = shift;
     &Apache::loncommon::no_cache($r);
     &Apache::lonlocal::get_language_handle($r);
-    $r->content_type('text/html');
+    &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
     return OK if $r->header_only;
 
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.122 loncom/interface/loncommon.pm:1.123
--- loncom/interface/loncommon.pm:1.122	Sat Sep 20 09:21:45 2003
+++ loncom/interface/loncommon.pm	Sun Sep 21 16:06:36 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.122 2003/09/20 13:21:45 www Exp $
+# $Id: loncommon.pm,v 1.123 2003/09/21 20:06:36 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2319,6 +2319,14 @@
   $r->no_cache(1);
   $r->header_out("Pragma" => "no-cache");
   #$r->header_out("Expires" => $date);
+}
+
+sub content_type {
+  my ($r,$type,$charset) = @_;
+  unless ($charset) {
+      $charset=&Apache::lonlocal::current_encoding;
+  }
+  $r->content_type($type.($charset?'; charset='.$charset:''));
 }
 
 =pod
Index: loncom/localize/localize/de.pm
diff -u loncom/localize/localize/de.pm:1.16 loncom/localize/localize/de.pm:1.17
--- loncom/localize/localize/de.pm:1.16	Sat Sep 20 10:16:09 2003
+++ loncom/localize/localize/de.pm	Sun Sep 21 16:06:36 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # German Localization Lexicon
 #
-# $Id: de.pm,v 1.16 2003/09/20 14:16:09 www Exp $
+# $Id: de.pm,v 1.17 2003/09/21 20:06:36 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -34,7 +34,7 @@
 
 %Lexicon=('_AUTO' => 1,
           
-'char_encoding'=> 'iso-8859-1',
+'char_encoding'=> 'ISO-8859-1',
 
    'Domain'
 => 'Domäne',