jstedfast / MimeKit

A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
http://www.mimekit.net
MIT License
1.82k stars 369 forks source link

Crash on iOS when using TNEF due to missing code page #78

Closed david-olsen-nc closed 10 years ago

david-olsen-nc commented 10 years ago

When I build MimeKit.Mobile.sln and run it on iOS using Xamarin, attempts to parse a TNEF part cause a crash due to an unhandled exception in the static initializer for class TnefPropertyReader:

static readonly Encoding DefaultEncoding = Encoding.GetEncoding (1252);

The exception is a NotSupportedException with the message "CodePage 1252 not supported."

jstedfast commented 10 years ago

In your iOS app, go to Project Options -> iOS Build -> Advanced and enable i18n support for Western languages for each of the project configurations (Debug, AppStore, etc) and (iPhoneSimulator, iPhone).

iOS Build Options