From a1b5f9b607ed0f812f648e15d9b18946ee747c7f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 11 Jul 2008 09:22:49 +0000 Subject: [PATCH] =?utf8?q?Das=20XUL/XML-Men=C3=BC=20muss=20auch=20bei=20Ve?= =?utf8?q?rwendung=20von=20UTF-8=20als=20Zeichensatz=20richtig=20codiert?= =?utf8?q?=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/menuXML.pl | 65 ++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 31 deletions(-) diff --git a/bin/mozilla/menuXML.pl b/bin/mozilla/menuXML.pl index f36cb4b1c..0f33b2e63 100644 --- a/bin/mozilla/menuXML.pl +++ b/bin/mozilla/menuXML.pl @@ -46,43 +46,46 @@ use Encode; # end of main sub display { - print $form->create_http_response('content_type' => 'text/xml', - 'charset' => 'iso-8859-1'); - print qq|\n|; - print qq|\n|; - print qq| - - - -]>|; - print qq||; - print qq||; - print %myconfig->{name}; - print qq||; - print qq||; - print %myconfig->{dbname}; - print qq||; - print qq||; - my $fav=%myconfig->{favorites}; - my @favorites = split(/;/, $fav); + $locale = Locale->new($language, "menu"); + my $charset = $dbcharset || 'ISO-8859-1'; + + my $text = $form->create_http_response('content_type' => 'text/xml', + 'charset' => $charset) + . qq| + +{iconv_iso8859}->convert('ß') . qq|"> +{iconv_iso8859}->convert('ä') . qq|"> +{iconv_iso8859}->convert('ö') . qq|"> +{iconv_iso8859}->convert('ü') . qq|"> +]> + + +$myconfig{name} + +$myconfig{dbname} + +|; + + my $fav = $myconfig{favorites}; + my @favorites = split m/;/, $fav; foreach (@favorites) { - print qq||; + $text .= qq||; } - print qq||; - print qq||; -my $isoencodedmenu=&acc_menu($menu); - print encode("iso-8859-1",$isoencodedmenu ); - - print qq||; - print qq||; - + + $text .= qq|\n| + . qq|\n| + . acc_menu() + . qq|\n| + . qq|\n|; + + print $text; + + $main::lxdebug->message(0, "text $text"); } sub acc_menu { - $locale = Locale->new($language, "menu"); - $mainlevel = $form->{level}; $mainlevel =~ s/$mainlevel--//g; my $menu = new Menu "$menufile"; -- 2.20.1