The BOM is allowed in UTF-8 and must per the unicode standard be stripped before any further processing of the text occurs. So I would say that it is a bug in Mojolicious that it doesn't strip the BOM.
luckily I found the error: It appears that Mojolicious::Plugin::ConsoleLogger is to blame for my troubles, because if I don't use it the output is correct, except for the BOM issue - which is manageable. /DryDuck On Sunday, 30 August 2015 00:53:15 UTC+2, Dan Book wrote: > > UTF-8 encoded files should not have a BOM, that is normal. I don't know > about mod_perl and plack's handling of encoding, but could you use a proxy > to Hypnotoad instead of going through mod_perl and PSGI? It would be a > cleaner solution. > > On Sat, Aug 29, 2015 at 5:20 PM, DryDuck <[email protected] > <javascript:>> wrote: > >> Hi >> >> I have run into a strange bug. >> >> When I run my Mojolicious app under Apache using "PerlResponseHandler >> Plack::Handler::Apache2" all utf8 characters are double encoded. >> On the other hand if the app is run using plackup then the output is >> correct, except for the BOM issue explained below. >> >> The template file is utf8 encoded, without a BOM, because if it has a BOM >> then the BOM is included in the output. >> Also when the template has a BOM any commands in the first line of the >> file are ignored. >> >> I'm using: >> >> Ubuntu 14.04.3 LTS >> Plack 1.0037 (installed from CPAN) >> Apache/2.4.7 >> Perl v5.18.2 >> mod_perl 2.000008 >> Mojolicious 6.17 (installed from CPAN) >> >> I am at a loss as to both why the utf8 characters are getting double >> encoded and why the BOM is included in the output. >> >> >> /DryDuck >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Mojolicious" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/mojolicious. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
