Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is translit generally available or does it depend on the compilation options of iconv? we had UTF8//IGNORE in the past and it was troublesome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, but used a lot in so many projects & environments and I haven't spotted a single issue. I found both
//TRANSLIT
and//IGNORE
options everywhere I read anything about Iconv. Honestly I've never even think this can failed (at least with clear from and to encodings and without autodetections).There was some problems in some Iconv implementations, for example on some docker alphine images, but IMHO nothing so unusual & there was some fixes for it (mainly updates binaries from edges).
This PR is as a suggestion, if someone has a better experience with character encoding then please review and replace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#3908 was the older thread about //IGNORE issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly I see no risk here, cause this change does even matter only if there was an exception thrown, which is currently not handled properly, preventing some users from reading emails with corrupted encodings, which IMHO is more annoying than potential risk of misleading characters replacement. If under any environment this will fail, then again, now it is failing anyway too, so nothing change really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The risk is that there are possibly environments that currently work and will break with this change.
Could you check if Alpine's iconv handles //TRANSLIT without any issues?
#3908 (comment) for the specific issues we had earlier.
If translit works with all iconv implementations I'm okay with this change 👍
Thanks