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

Email::MIME requires encoding & charset #35

Merged
merged 1 commit into from Feb 13, 2012
Merged

Conversation

madsen
Copy link
Contributor

@madsen madsen commented Feb 13, 2012

The "Sending an email" example does not work as written. You get the error "body_str was given, but no charset is defined at /usr/local/share/perl/5.10.1/Email/MIME.pm line 243". See this question on Stack Overflow.

Also, an email body should normally end with a newline

  Also, an email body should normally end with a newline
abh added a commit that referenced this pull request Feb 13, 2012
Email::MIME requires encoding & charset
@abh abh merged commit 6e50a44 into perlorg:master Feb 13, 2012
@abh
Copy link
Contributor

abh commented Feb 13, 2012

Thanks!

Wouldn't it (maybe) make sense to have the example encode with utf-8 instead?

@madsen
Copy link
Contributor Author

madsen commented Feb 13, 2012

Well, you have to leave something for the student to figure out. :-)

It doesn't really matter, since the body is actually US-ASCII.

@madsen
Copy link
Contributor Author

madsen commented Feb 13, 2012

I just noticed that same broken example also appears here on the FAQ page. But that file says "DO NOT EDIT THIS FILE, AUTO GENERATED FROM THE perlfaq", and I'm not sure where the source for that is.

@abh
Copy link
Contributor

abh commented Feb 13, 2012

@ranguard the canonical source for the perlfaq is at https://github.com/tpf/perlfaq - or?

@ranguard
Copy link
Member

Yep, although we prefer patches / pull requests to https://github.com/perl-doc-cats/perlfaq - which is then released to https://github.com/tpf/perlfaq before going to CPAN.

@ghost
Copy link

ghost commented Feb 13, 2012

@madsen Leaving the student to get UTF-8 right is a terrible idea, considering how many skilled programmers get it wrong. I'll merge something derived from the above into the perlfaq that handles UTF-8 properly for the user. The point of the FAQ is to answer hard questions for them, not let them figure out the hard stuff on their own and get it wrong.

@ranguard
Copy link
Member

@madsen - thanks for reporting this - now updated in the perlfaq as well (which will update on the website shortly), I also updated the comment about not to update the file so that it mentions the perlfaq gitrepo

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

Successfully merging this pull request may close these issues.

None yet

3 participants