Index: po4a/lib/Locale/Po4a/Xml.pm =================================================================== RCS file: /cvsroot/wine/docs/po4a/lib/Locale/Po4a/Xml.pm,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Xml.pm --- po4a/lib/Locale/Po4a/Xml.pm 14 May 2005 12:37:34 -0000 1.1.1.1 +++ po4a/lib/Locale/Po4a/Xml.pm 19 May 2005 10:00:11 -0000 @@ -399,7 +399,14 @@ sub tag_trans_xmlhead { $self->detected_charset($in_charset); my $out_charset=$self->get_out_charset; - $tag =~ s/$in_charset/$out_charset/; + if (defined $in_charset) + { + $tag =~ s/$in_charset/$out_charset/; + } + else + { + $tag.= " encoding='$out_charset'"; + } return $tag; }