Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf8 encoding problem with "vroom -html" #8

Open
aero opened this issue Apr 11, 2013 · 0 comments
Open

utf8 encoding problem with "vroom -html" #8

aero opened this issue Apr 11, 2013 · 0 comments

Comments

@aero
Copy link

aero commented Apr 11, 2013

Hi,
Vroom double-encodes vroom slide file when execute "vroom -html"

Template::Toolkit::Simple uses utf8 encoding as a default, So input text should be utf8 flag on utf8 string(aka. perl's internal unicode string).

This is a patch for that.

--- Vroom.pm.org        2013-04-11 14:41:02.000000000 +0900
+++ Vroom.pm    2013-04-11 14:40:42.000000000 +0900
@@ -239,7 +239,7 @@
         my $slide = $slides[$i];
         my $prev = ($i > 0) ? $slides[$i - 1] : '';
         my $next = ($i + 1 < @slides) ? $slides[$i + 1] : '';
-        my $text = io($slide)->all;
+        my $text = io($slide)->utf8->all;
         my $title = $text;
         $text = Template::Toolkit::Simple->new()->render(
             $self->slideTemplate,
@@ -257,7 +257,7 @@
     for (my $i = 0; $i < @slides; $i++) {
         my $slide = $slides[$i];
         next if $slide =~ /^\d+[a-z]/;
-        my $title = io($slide)->all;
+        my $title = io($slide)->utf8->all;
         $title =~ s/.*?((?-s:\S.*)).*/$1/s;
         push @$index, [$slide, $title];
     }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant