Permalink
Browse files

use all uppercase UTF-8 as encoding value in accordance with XML spec…

…ification
  • Loading branch information...
1 parent ac7c1d6 commit 8164a81305b8755a64566b961eda751f532c0634 @invalid-email-address invalid-email-address committed Jul 13, 2011
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/XML/Atom/Base.pm
  2. +1 −1 lib/XML/Atom/Server.pm
View
@@ -27,7 +27,7 @@ sub init {
my $elem;
unless ($elem = $param{Elem}) {
if (LIBXML) {
- my $doc = XML::LibXML::Document->createDocument('1.0', 'utf-8');
+ my $doc = XML::LibXML::Document->createDocument('1.0', 'UTF-8');
my $ns = $obj->ns;
my ($ns_uri, $ns_prefix);
if ( ref $ns and $ns->isa('XML::Atom::Namespace') ) {
@@ -353,11 +353,11 @@ sub mk_object_list_accessor {
sub as_xml {
my $obj = shift;
if (LIBXML) {
- my $doc = XML::LibXML::Document->new('1.0', 'utf-8');
+ my $doc = XML::LibXML::Document->new('1.0', 'UTF-8');
$doc->setDocumentElement($obj->elem->cloneNode(1));
return $doc->toString(1);
} else {
- return '<?xml version="1.0" encoding="utf-8"?>' . "\n" .
+ return '<?xml version="1.0" encoding="UTF-8"?>' . "\n" .
$obj->elem->toString;
}
}
View
@@ -227,7 +227,7 @@ sub show_error {
FAULT
} else {
return <<ERR;
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<error>$err</error>
ERR
}

0 comments on commit 8164a81

Please sign in to comment.