Changeset 13027 for trunk/core/lib/Foswiki/Logger/PlainFile.pm
- Timestamp:
- 11/09/11 06:35:05 (19 months ago)
- File:
-
- 1 edited
-
trunk/core/lib/Foswiki/Logger/PlainFile.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/Logger/PlainFile.pm
r12668 r13027 4 4 use strict; 5 5 use warnings; 6 use utf8; 6 7 use Assert; 7 8 … … 83 84 my $mode = '>>'; 84 85 85 # Item10764, TODO: actually, perhaps we should open the stream this way 86 # for any encoding, not just utf8. Babar says: check what Catalyst does. 87 # TODO: 'utf8' vs 'utf-8' 88 if ( $Foswiki::cfg{Site}{CharSet} eq 'utf-8' ) { 89 $mode .= ':encoding(utf8)'; 86 # Item10764, SMELL UNICODE: actually, perhaps we should open the stream this 87 # way for any encoding, not just utf8. Babar says: check what Catalyst does. 88 if ( $Foswiki::cfg{Site}{CharSet} =~ /^utf-?8$/ ) { 89 $mode .= ":encoding($Foswiki::cfg{Site}{CharSet})"; 90 90 } elsif ( utf8::is_utf8($message) ) { 91 91 require Encode; 92 $message = Encode::encode( $Foswiki::cfg{Site}{CharSet}, $message, 0 );92 $message = Encode::encode( $Foswiki::cfg{Site}{CharSet}, $message, 0 ); 93 93 } 94 94 if ( open( $file, $mode, $log ) ) {
Note: See TracChangeset
for help on using the changeset viewer.
