Comments (8)
Just wanna comment that package https://github.com/cention-sany/utf7 is https://tools.ietf.org/html/rfc2152 compliance meanwhile https://github.com/emersion/go-imap/tree/v1/utf7 seem to be https://tools.ietf.org/html/rfc3501#section-5.1.3 which actually two slightly different UTF-7.
from enmime.
Looks like cp-850 and ibm850 is charmap.CodePage850
from enmime.
Looks like you took care of most of these. Seems like Go does not support UTF-7 out of the box, not sure if that's because Rob Pike invented UTF-8 and doesn't want it. We could leverage:
https://github.com/cention-sany/utf7
@cention-sany appears to make use of a heavily modified version of the older go.enmime
I'd like to avoid adding a bunch of dependencies if possible, but I'd rather one import than bring in iconv, since it wraps a C library; complicating the build.
from enmime.
Sounds good to me, I'd avoid iconv as well.
from enmime.
Looks like https://github.com/emersion/go-imap/tree/v1/utf7 may be a more idiomatic implementation. Turns out that UTF-7 was actually defined in the IMAP RFC.
from enmime.
Good to know, skimming rfc2152, it was specifically designed for internet mail content, so your implementation would be the better choice for enmime.
from enmime.
@jhillyerd Nice one
from enmime.
If I had known it was only going to take 3 lines of code to implement, I might not have waited two years to fix this. 🙄
from enmime.
Related Issues (20)
- golangci workflow broken
- Character decoding characters of other written languages for .Text HOT 3
- Delivery Status Notification parsing (bounce messages) HOT 1
- TestReadHeader/equals_in_name fails on Go1.20 HOT 3
- Export coding package? HOT 1
- Bug in validHeaderFieldByte(): characters disallowed in http header field are allowed in email header field HOT 7
- Any plan to tag a new version? HOT 1
- Attachment not detected HOT 3
- Breaking change: do not modify header case? HOT 2
- Request: Additional case-normalizing before passing into mime.ParseMediaType
- Type of the `(*enmime.Part).Header` field is now private HOT 3
- BCC addresses are not added HOT 5
- Use `errors.Is()` and `errors.As()` to compare error values and types
- EML Attactment Issue
- Parser can loose the original content format
- Failing to find attachments for emails sent by apple mail HOT 2
- ReadPartErrorPolicy not called for part content with malformed base64
- Update golangci-lint linters config
- BUG: GetHeader() doesn't add quote for especials
- Declared header character encoding cannot always be trusted HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enmime.