[LON-CAPA-cvs] cvs: loncom /localize lonlocal.pm

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 18 Apr 2005 22:17:46 -0000


albertel		Mon Apr 18 18:17:46 2005 EDT

  Modified files:              
    /loncom/localize	lonlocal.pm 
  Log:
  - tth, UTF-8 and IE don't get along
  
  
Index: loncom/localize/lonlocal.pm
diff -u loncom/localize/lonlocal.pm:1.32 loncom/localize/lonlocal.pm:1.33
--- loncom/localize/lonlocal.pm:1.32	Thu Feb 17 03:51:08 2005
+++ loncom/localize/lonlocal.pm	Mon Apr 18 18:17:45 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Localization routines
 #
-# $Id: lonlocal.pm,v 1.32 2005/02/17 08:51:08 albertel Exp $
+# $Id: lonlocal.pm,v 1.33 2005/04/18 22:17:45 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -206,11 +206,16 @@
 # ============================================================== What encoding?
 
 sub current_encoding {
+    my $default='UTF-8';
+    if ($Apache::lonnet::env{'browser.os'} eq 'win' && 
+	$Apache::lonnet::env{'browser.type'} eq 'explorer') {
+        $default=undef;
+    }
     if ($lh) {
 	my $enc=$lh->maketext('char_encoding');
-	return ($enc eq 'char_encoding'?'UTF-8':$enc);
+	return ($enc eq 'char_encoding'?$default:$enc);
     } else {
-	return 'UTF-8';
+	return $default;
     }
 }