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

Use of uninitialized value $tmpl in split at .../Mojo/Template.pm line 218. #321

Closed
jploski opened this issue Apr 20, 2012 · 6 comments
Closed

Comments

@jploski
Copy link

jploski commented Apr 20, 2012

Reporting against version 2.81:

In default configuration when a template's encoding is non-UTF-8 (but let's say ISO-8859-1, with an umlaut character), the title message is written to STDERR (at least in morbo) and no content whatsoever is sent to the browser. Please provide a more helpful error message (or even output garbage characters for fault tolerance's sake).

@kraih
Copy link
Member

kraih commented Apr 20, 2012

I don't understand a word, please add some code to your proposal/bug report.

@jploski
Copy link
Author

jploski commented Apr 20, 2012

The error should be easy to reproduce. Create a template index.html.ep with the following text:

<!DOCTYPE html><html><body>ü</body></html>

encoded as ISO-8859-1 (that is, using the single byte 0xFC rather than the two-byte sequence 0xC3 0xBC for the ü character). Then try requesting this template from morbo and you will see... nothing and the error message in console.

@kraih
Copy link
Member

kraih commented Apr 20, 2012

No, i mean what is the actual change you are proposing?

@jploski
Copy link
Author

jploski commented Apr 20, 2012

Catch the undef error and die with "invalid encoding detected in file index.html.ep".

@kraih kraih closed this as completed in 86c6ec0 Apr 20, 2012
@jploski
Copy link
Author

jploski commented Apr 20, 2012

Excellent, thanks!

@kraih
Copy link
Member

kraih commented Apr 20, 2012

Thanks for the explanation. :)

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

2 participants