这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Lemonsix
Copy link

@Lemonsix Lemonsix commented Aug 9, 2023

Some email parts has "ascii" but not "us-ascii" as charset. So i added it to the "or" statement to allow this charset instead of throwing an error.

Some email parts has "ascii" but not "us-ascii" as charset. So i added it to the "or" statement to allow this charset instead of throwing an error.
func charsetReader(charset string, input io.Reader) (io.Reader, error) {
charset = strings.ToLower(charset)
if charset == "utf-8" || charset == "us-ascii" {
if charset == "utf-8" || charset == "us-ascii" || charset == "ascii"{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the space before {

@emersion
Copy link
Owner

Sorry, I'd rather keep the defaults purely RFC-compliant, and leave it to the custom charset reader to handle the non-standard cases.

@emersion emersion closed this Dec 26, 2023
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.

3 participants