Skip to content

Commit

Permalink
Item10882: Fix display of international chars on utf-8 Foswikis
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk/BibliographyPlugin@11924 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
PaulHarvey authored and PaulHarvey committed Jun 15, 2011
1 parent 6923f8e commit a408088
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Foswiki/Plugins/BibliographyPlugin/Core.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use strict;
use warnings;
use Assert;
use HTML::Entities;
use Encode;

# Change to 1 for more debug messages. Perl compiler should optimise out
# (ie. no CPU cost) any statement checking its value when set to zero.
Expand Down Expand Up @@ -375,7 +376,13 @@ sub _parseBibliographyTopics {

# Use a $fh rather than loope over a split(/[\r\n]+/
# ... so we save a little memory
if ( open my $text_fh, '<', \$text ) {
if (
open my $text_fh,
'<:encoding('
. ( $Foswiki::cfg{Site}{CharSet} || 'iso-8859-1' ) . ')',
\$text
)
{
while ( my $line = <$text_fh> ) {
_parseline($line);
}
Expand Down

0 comments on commit a408088

Please sign in to comment.