From: Moritz Bunkus Date: Fri, 11 Jul 2008 09:22:49 +0000 (+0000) Subject: Das XUL/XML-Menü muss auch bei Verwendung von UTF-8 als Zeichensatz richtig codiert... X-Git-Tag: release-2.6.0beta1~60 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a1b5f9b607ed0f812f648e15d9b18946ee747c7f;p=kivitendo-erp.git Das XUL/XML-Menü muss auch bei Verwendung von UTF-8 als Zeichensatz richtig codiert werden. --- 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";