Comments (10)
Should it be considered a bug as this could be properly handled in the TryParseMailbox
from mimekit.
Yea, this is a bug... I'll look into it.
from mimekit.
Mono supports cp936 (aka gb2312) and cp54936 (aka gb18030), but, as you noted, does not support cp51936 (aka euc-cn) nor cp52936 (aka hz-gb-2312).
So... what to do?
You probably know more about this than I do... so, if 51936 doesn't exist on the system, should it try falling back to 936? Or should it try 54936? or will neither of those work as a fallback?
Same for 52936... how should that fall back?
from mimekit.
I personally dont have experience in chinese. I happen to live in Hong Kong so I regularly get mails in this encoding. I guess falling back to 936 seems like the correct choice to do until mono gets full support for those encodings, and I think it should work for most characters.
from mimekit.
But thats a guess from my side as I cant read chinese
from mimekit.
firefox apparently fall backs to gb18030 which was then reported as a bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=844082
from mimekit.
and they plan to change it to GBK (gb2312) which is also what you propose.
from mimekit.
Awesome discovery, thanks!
from mimekit.
should it be pushed back in the mono runtime or just a fix in MimeKit? Other programs could benifit automatically if its pushed upstream
from mimekit.
Well, System.Text.Encoding doesn't make any guarantees about what encodings it supports, so I don't think it's necessarily something that should be pushed down into Mono.
The TryParseMailbox() code should not have assumed that the codepage it got existed (although it should generally be safe to make that assumption...), so I added a try/catch around it. The encoding, at that point, is only needed to set on the MailboxAddress anyway.
I also fixed up CharsetUtils's charset mapping tables (this is how TryParseMailbox() got the correct codepage even when the system didn't support it).
from mimekit.
Related Issues (20)
- The PGP key server query builder omits leading zero(s) in 'keyId' parameter HOT 1
- Problem compiling tag 3.0.0 in x64 HOT 2
- Update BouncyCastle.Cryptography to 2.3.1 HOT 3
- PgpCore / MimeKit? HOT 2
- MimeKitLite not bumped to v4.6.0 on NuGet HOT 1
- SQLite is not available. Install the System.Data.SQLite nuget package. HOT 1
- Setting the attachment code is invalid HOT 12
- MimeKit is parsing address as `GroupAddress` instead of `MailboxAddress` HOT 2
- From returns blank when it contains special characters HOT 6
- Add an image as an in line signature HOT 3
- Mimekit 3.3+ Japanese CP encoding regression? HOT 1
- message/rfc822 attachment with blank Content-Transfer-Encoding header causes attachment to become corrupted when loaded and prepared by mimekit HOT 5
- ERROR: The type initializer for 'PerTypeValues1' threw an exception. HOT 3
- "|" and English cannot be correctly transcoded together HOT 5
- Message.Prepare adds '=\r\n' to last line if it doesn't end with a newline HOT 7
- Getting Exception Format Error with message: Failed to parse message headers HOT 3
- How do I decrypt attachments in S/MIME messages and save them
- MailKit crashes from headers in Korean HOT 5
- Failed to read header of mail dragged directly from outlook to my WPF app HOT 5
- Annotate nullable reference types in public APIs HOT 4
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 mimekit.