From d72dd9ab9b02a72c63ab06bf8472a43bf0ba45a5 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 7 Nov 2012 17:18:08 +0100 Subject: [PATCH] OpenDocument: Nicht-ASCII-Zeichen in styles.xml in UTF-8 konvertieren Fixt #1861. --- SL/Template/OpenDocument.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/Template/OpenDocument.pm b/SL/Template/OpenDocument.pm index 12a7bc8c5..b4ea1f2a5 100644 --- a/SL/Template/OpenDocument.pm +++ b/SL/Template/OpenDocument.pm @@ -270,14 +270,14 @@ sub parse { $zip->contents("content.xml", Encode::encode('utf-8-strict', $new_contents)); - my $styles = $zip->contents("styles.xml"); + my $styles = Encode::decode('utf-8-strict', $zip->contents("styles.xml")); if ($contents) { my $new_styles = $self->parse_block($styles); if (!defined($new_contents)) { $main::lxdebug->leave_sub(); return 0; } - $zip->contents("styles.xml", $new_styles); + $zip->contents("styles.xml", Encode::encode('utf-8-strict', $new_styles)); } $zip->writeToFileNamed($form->{"tmpfile"}, 1); -- 2.20.1