From: <de...@de...> - 2007-02-27 17:59:04
|
Author: KennethLavrsen Date: 2007-02-27 11:58:58 -0600 (Tue, 27 Feb 2007) New Revision: 12991 Modified: twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm Log: Item3652: Attachments need to be downgraded from utf8 we only do this in Perl 5.8. Modified: twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm =================================================================== --- twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm 2007-02-27 17:58:09 UTC (rev 12990) +++ twiki/branches/Patch04x01/lib/TWiki/Store/RcsFile.pm 2007-02-27 17:58:58 UTC (rev 12991) @@ -83,6 +83,14 @@ $this->{rcsFile} = $TWiki::cfg{DataDir}.'/'. $web.$rcsSubDir.'/'.$topic.'.txt,v'; } + + # remove utf8 encodings from filenames + if( $] >= 5.008 ) { + utf8::downgrade($this->{attachment}) if $attachment && utf8::is_utf8($this->{attachment}); + utf8::downgrade($this->{file}) if utf8::is_utf8($this->{file}); + utf8::downgrade($this->{rcsFile}) if utf8::is_utf8($this->{rcsFile}); + } + } return $this; |