xslate/p5-Text-Xslate — Issue #54: source of template string determines output encoding under `use utf8;`
Author: wchristian
Created: 2011-12-24 00:34:12+00:00
State: open

I have uploaded a minimal test case for this issue here:

http://dl.dropbox.com/u/10190786/encoding.zip

What happens for me is that `test_result_works` is written as a file with proper unicode content; but writing `test_result_broken` causes the script to die with an error about wide characters.

The difference between those is that the working file is written with a template defined within the perl code itself; while the broken file template comes from the __DATA__ section. Earlier testing indicates that in the first case, Text::Xslate returns bytes and in the second case character. `use utf8` is in effect for both of those, so the difference in behavior is unexpected.