use binmode to load data in cp1250 encoding
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Jun 2010 19:04:36 +0000 (21:04 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 22 Jun 2010 19:04:36 +0000 (21:04 +0200)
lib/MojoFacets/Import/CSV.pm

index 7d62f15..41c168a 100644 (file)
@@ -18,7 +18,7 @@ sub data {
 
        my $path = $self->path;
 
-       my $data = read_file $self->full_path;
+       my $data = read_file $self->full_path, { binmode => ':cp1250' }; # FIXME configurable!
 
        my @lines = split(/\r?\n/, $data);
        $data = { items => [] };