Skip Menu |
 

This queue is for tickets about the AxKit CPAN distribution.

Report information
The Basics
Id: 2306
Status: resolved
Priority: 0/
Queue: AxKit

People
Owner: Nobody in particular
Requestors: abc [...] tlgonline.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.6.1
Fixed in: (no value)

Attachments


Subject: small patch
Download (untitled) / with headers
text/plain 356b
Show quoted text
> Please review this patch (for last CVS that I downloaded today) > (again - to minimize warning messages) > > > Let me know please if my changes there are wrong. > > Please take a look to "binmode $fh, ':utf8'". It disables > warnings "Wide character in print at ...." under Perl5.8... > Will it be a problem under other perl versions? I hope, that > not.
Download cvspatch.patch
text/x-diff 2.4k
diff -Naur test2/i386-linux/Apache/AxKit/Language/XSP/SimpleTaglib.pm 5.8.0/i386-linux/Apache/AxKit/Language/XSP/SimpleTaglib.pm --- test2/i386-linux/Apache/AxKit/Language/XSP/SimpleTaglib.pm 2003-01-29 07:35:50 +0600 +++ 5.8.0/i386-linux/Apache/AxKit/Language/XSP/SimpleTaglib.pm 2003-03-26 16:20:40 +0600 @@ -12,7 +12,7 @@ # utility functions sub makeSingleQuoted($) { $_ = shift; s/([\\%])/\\$1/g; 'q%'.$_.'%'; } -sub _makeAttributeQuoted(@) { $_ = join(',',@_); s/([\\()])/\\\1/g; '('.$_.')'; } +sub _makeAttributeQuoted(@) { $_ = join(',',@_); s/([\\()])/\\$1/g; '('.$_.')'; } sub makeVariableName($) { $_ = shift; s/[^a-zA-Z0-9]/_/g; $_; } # perl attribute handlers @@ -101,7 +101,7 @@ foreach my $a (@attr) { #warn("attr: $a"); my ($attr,$param) = ($a =~ m/([^(]*)(?:\((.*)\))?$/); - $param = eval "q($param)"; + $param = defined($param) ? eval "q($param)" : ""; my @param = split(/,/,$param); if ($attr eq 'expr') { diff -Naur test2/i386-linux/Apache/AxKit/Language/XSP.pm 5.8.0/i386-linux/Apache/AxKit/Language/XSP.pm --- test2/i386-linux/Apache/AxKit/Language/XSP.pm 2003-03-26 16:13:55 +0600 +++ 5.8.0/i386-linux/Apache/AxKit/Language/XSP.pm 2003-03-26 16:21:46 +0600 @@ -132,7 +132,7 @@ $interm_prefix = $AxKit::Cfg->TraceIntermediate.'/'.$interm_prefix; my $fh = Apache->gensym(); if (open($fh, '>'.$interm_prefix.'.XSP')) { - print($fh $to_eval); + binmode $fh, ':utf8'; print($fh $to_eval); } else { AxKit::Debug(1,"could not open $interm_prefix.XSP for writing: $!"); } @@ -332,7 +332,7 @@ sub location_debug_string { my ($e, $file, $line) = @_; - return '' if !$e->{XSP_Debug} || $file =~ m/^AxKit::XSP::Core::/; + return '' if !$e->{XSP_Debug} || ($file && ($file =~ m/^AxKit::XSP::Core::/)); (undef, $file, $line) = caller if (@_ < 3); $file =~ s/"/''/; $file =~ s/\n/ /; diff -Naur test2/i386-linux/AxKit.pm 5.8.0/i386-linux/AxKit.pm --- test2/i386-linux/AxKit.pm 2003-03-26 16:13:45 +0600 +++ 5.8.0/i386-linux/AxKit.pm 2003-03-26 16:17:57 +0600 @@ -784,7 +784,7 @@ $xmlstr = "<?xml version='1.0'?>\n<empty reason='no data found'/>\n"; } } - print($fh $xmlstr); + binmode($fh, ":utf8"); print($fh $xmlstr); close($fh); $interm_count++; } else {
Download (untitled) / with headers
text/plain 315b
Does setting your locale to the non-utf8 settings not fix this? There are numerous bugs that are caused by default redhat settings that get reflected in this, so please make sure your /etc/sysconfig/i18n file doesnt contain any UTF8 settings. If that doesn't fix the problem we'll re-open the bug and try your fix.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.