UTF8-Flags setzen/beachten
[kivitendo-erp.git] / SL / Template.pm
index 7f4d275..f767967 100644 (file)
@@ -838,9 +838,12 @@ sub parse {
 
 package OpenDocumentTemplate;
 
+use Archive::Zip;
 use POSIX 'setsid';
 use vars qw(@ISA);
 
+use SL::Iconv;
+
 use Cwd;
 # use File::Copy;
 # use File::Spec;
@@ -856,19 +859,8 @@ sub new {
 
   my $self = $type->SUPER::new(@_);
 
-  foreach my $module (qw(Archive::Zip Text::Iconv)) {
-    eval("use ${module};");
-    if ($@) {
-      $self->{"form"}->error("The Perl module '${module}' could not be " .
-                             "loaded. Support for OpenDocument templates " .
-                             "does not work without it. Please install your " .
-                             "distribution's package or get the module from " .
-                             "CPAN ( http://www.cpan.org ).");
-    }
-  }
-
   $self->{"rnd"}   = int(rand(1000000));
-  $self->{"iconv"} = Text::Iconv->new($main::dbcharset, "UTF-8");
+  $self->{"iconv"} = SL::Iconv->new($main::dbcharset, "UTF-8");
 
   $self->set_tag_style('<%', '%>');
   $self->{quot_re} = '"';