1. Shlomi Fish
  2. perl-XML-LibXML

Commits

ma...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed f86240f

Added t/19 to MANIFEST
Still do encoding switching on non-unicode perls

  • Participants
  • Parent commits 134be04
  • Branches default

Comments (0)

Files changed (2)

File MANIFEST

View file
 t/16docnodes.t
 t/17callbacks.t
 t/18docfree.t
+t/19encoding.t
 lib/XML/LibXML/Attr.pod
 lib/XML/LibXML/Comment.pod
 lib/XML/LibXML/Dtd.pod

File perl-libxml-mm.c

View file
         STRLEN len;
         xmlChar* string = xmlStrdup((xmlChar*)SvPV(scalar, len));
         if ( xmlStrlen(string) > 0 ) {
+            xmlChar* ts;
             xs_warn( "no undefs" );
 #ifdef HAVE_UTF8
             xs_warn( "use UTF8" );
             if( !SvUTF8(scalar) && encoding != NULL ) {
-                xmlChar* ts;
+#else
+            if ( encoding != NULL ) {
+#endif
                 xs_warn( "domEncodeString!" );
                 ts= domEncodeString( encoding, string );
                 xs_warn( "done!" );
                     xmlFree(string);
                 string=ts;
             }
-#endif
             retval = xmlStrdup(string);
             xmlFree(string);
         }