Reputation: 2815
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 ?
Upvotes: 2
Views: 596
Reputation: 168715
Use UTF-8 encoding if possible -- that's always the best answer.
However if you really can't use UTF-8, you could replace the copyright symbol with it's HTML entity -- ©
. That will render as the copyright symbol in the browser without you needing to actually send a UTF-8 character.
Preferable to use UTF-8 though if you can; it makes things a lot easier.
Upvotes: 3
Reputation: 26861
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
Upvotes: 5