> I looked at the CVS, and I don't think this issue is addressed. And 
> quite frankly, I don't want to have to add more taglibs for every 
> "outside" variable that I need to use, so I have a proposition:
> 
> Is it ok if we force the result of a <xsp:expr> to be converted to UTF, 
> no matter what? Attatched is the diff of this proposition.
> 
> This may be too naive and brute force of a way to address this, but 
> maybe this can trigger brighter minds to come up with a better solution.

Argh, wrong diff.

--d

Index: lib/Apache/AxKit/Language/XSP.pm
===================================================================
RCS file: /home/cvs/AxKit/lib/Apache/AxKit/Language/XSP.pm,v
retrieving revision 1.59
diff -u -r1.59 XSP.pm
--- lib/Apache/AxKit/Language/XSP.pm    2001/11/14 15:40:58     1.59
+++ lib/Apache/AxKit/Language/XSP.pm    2002/02/24 07:18:04
@@ -7,6 +7,7 @@
 use Apache::Request;
 use Apache::AxKit::Exception;
 use Apache::AxKit::Cache;
+use Apache::AxKit::CharsetConv;
 
 use vars qw/@ISA/;
 
@@ -280,6 +281,9 @@
                 "#line 2 ".$e->{XSP_Line}."\n",
                 "use Apache;",
                 "use XML::LibXML;",
+                               "use Apache::AxKit::CharsetConv;",
+                               'use vars qw/ $CONVERTER /;',
+                               "BEGIN { \$CONVERTER = 
+Apache::AxKit::CharsetConv->new( '$e->{ XSP_Encoding }' => 'UTF-8' ) }",
                 );
     
     foreach my $ns (keys %Apache::AxKit::Language::XSP::tag_lib) {
@@ -613,17 +617,17 @@
             if (!$e->manage_text() || $node->{Parent}->{Name} =~ /^(.*:)?content$/) {
                 return <<'EOT';
 {
-    my $text = $document->createTextNode("".do {
+    my $text = $document->createTextNode( $CONVERTER->convert( "".do { 
 EOT
             }
             elsif ($node->{Parent}->{Name} =~ /^(.*:)?(logic|expr)$/) {
-                return 'do {';
+                return '$CONVERTER->convert( do {';
             }
         }
         else {
             return <<'EOT';
 {
-    my $text = $document->createTextNode("".do {
+    my $text = $document->createTextNode( $CONVERTER->convert( "".do {
 EOT
         }
         
@@ -688,18 +692,18 @@
         if 
(Apache::AxKit::Language::XSP::is_xsp_namespace($node->{Parent}->{NamespaceURI})) {
             if (!$e->manage_text() || $node->{Parent}->{Name} =~ /^(.*:)?content$/) {
                 return <<'EOT';
-}); # xsp tag
+})); # xsp tag
     $parent->appendChild($text); 
 }
 EOT
             }
             elsif ($node->{Parent}->{Name} =~ /^(.*:)?(logic|expr)$/) {
-                return '}';
+                return '})';
             }
         }
         else {
             return <<'EOT';
-}); # non xsp tag
+})); # non xsp tag
     $parent->appendChild($text); 
 }
 EOT
@@ -824,6 +828,9 @@
     $doc->process_xinclude;
     
     my $document = { Parent => undef };
+
+       $self->{ Handler }->{ XSP_Encoding } = $doc->getEncoding;
+
     $self->{Handler}->start_document($document);
     
     my $root = $doc->getDocumentElement;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to