[MKDoc-commit] [1.6] fix charset of photo attributes (server error when using

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Wed Oct 12 10:35:30 BST 2005


Log Message:
-----------
[1.6] fix charset of photo attributes (server error when using smartquotes)

Tags:
----
mkdoc-1-6

Modified Files:
--------------
    mkd/flo/editor:
        Photo.pm

-------------- next part --------------
Index: Photo.pm
===================================================================
RCS file: /var/spool/cvs/mkd/flo/editor/Photo.pm,v
retrieving revision 1.11.2.48
retrieving revision 1.11.2.49
diff -Lflo/editor/Photo.pm -Lflo/editor/Photo.pm -u -r1.11.2.48 -r1.11.2.49
--- flo/editor/Photo.pm
+++ flo/editor/Photo.pm
@@ -412,13 +412,14 @@
 	}
 	else
 	{
+            $data = Encode::encode_utf8 ($data);
             my $hash = $self->xml_cache_get ($data) || do {
                 my $res = MKDoc::XML::Dumper->xml2perl ($data);
                 $self->xml_cache_set ($data, $res);
                 $res;
             };
 
-	    for (keys %{$hash}) { $self->{$_} = $hash->{$_} }
+	    for (keys %{$hash}) { $self->{$_} = Encode::decode_utf8 ($hash->{$_}) }
 	    
 	    # more data backwards compatibility options
 	    my $day   = delete $hash->{created_day};


More information about the MKDoc-commit mailing list