Search code examples
perlencodingutf-8iso-8859-1mojolicious

Mojolicious Template can't render © character


I found error on Mojolicious Renderer when try to render © character (ascii: 169)

(also return error when try to render ascii larger than > 128)

Template "D:\sandbox\mojo\templates\BlueLeaves\index.html.ep" has invalid encoding. at D:/Perl64/site/lib/Mojolicious/Plugin/EPLRenderer.pm line 44.

I tried to use both:

no utf8;

and

use utf8;

But always return same error message

Do you know how to fix this problem ?


Solution

  • I solved this issue by changing the encoding of the template file to utf8 file in my IDE.

    Check out this answer and save your file as utf8