[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm

droeschl droeschl at source.lon-capa.org
Fri Apr 10 04:22:21 EDT 2015


droeschl		Fri Apr 10 08:22:21 2015 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
  Log:
  Read problem template files as UTF-8 encoded files.
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.532 loncom/homework/structuretags.pm:1.533
--- loncom/homework/structuretags.pm:1.532	Tue Mar 10 23:11:22 2015
+++ loncom/homework/structuretags.pm	Fri Apr 10 08:22:21 2015
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.532 2015/03/10 23:11:22 raeburn Exp $
+# $Id: structuretags.pm,v 1.533 2015/04/10 08:22:21 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -811,7 +811,7 @@
         foreach my $title (sort @{$tmplthash{$cat}}) {
             my $path = $tmpltcontent{$title}->[0];
             my $code;
-            open(FH, "<$path");
+            open(FH, "<:encoding(UTF-8)", $path);
             while(<FH>){
                 $code.= $_ unless $_ =~ /(<problem>)|(<\/problem>)/;
             }




More information about the LON-CAPA-cvs mailing list