-
-
Notifications
You must be signed in to change notification settings - Fork 830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.NotSupportedException: No data is available for encoding 51936 #598
Comments
If you are using .NET Core, you need to register encodings. |
issue was not resolved ,kindly check it.
[image: Inline image 1]
* Thank and regards*
*Sourabh Saini*
Software Engineer
Expert Tech Source Pvt Ltd.
333-334 A Tower,
Spaze IT Tech Park
Sector-49, Gurgaon (Harayna).
Mob. 07042507252
…On Wed, Dec 13, 2017 at 11:48 PM, Jeffrey Stedfast ***@***.*** > wrote:
Closed #598 <#598>.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AY5wCskGvdWFdbKnfE-jdWYL_a_7IMLIks5tABUCgaJpZM4RA5v7>
.
|
Can you send me a pull request to fix it properly then? |
If you want me to fix it, you need to tell me how to reproduce the problem. Start with telling me what type of project you created and how I can duplicate that (i.e. which options did you enable?). Then tell me how you added the MailKit nuget and which MailKit assembly is being referenced (net45? netstandard? net461? a PCL?) |
Or better yet, just zip up your project and send it to me (either via email or link me to a dropbox or something). |
Looks like you created a Cross Platform -> Xamarin.Forms App and selected ".NET Standard" for your code-sharing strategy based on my fiddling with creating projects. Unfortunately for you, I don't get any exceptions when creating new MimeMessages when I go to run my compiled app. It works perfectly fine for me. |
Yes,you are right .I will make email client in xamarin,more over I am new
in xamarin application.so I will send you code zip for your
better understanding.
App5.rar
<https://drive.google.com/file/d/18PxdThg4aZC4ND2qwef4TGjJRbkf4OPe/view?usp=drive_web>
On 14 Dec 2017 2:22 am, "Jeffrey Stedfast" <notifications@github.com> wrote:
Looks like you created a Cross Platform -> Xamarin.Forms App and selected
".NET Standard" for your code-sharing strategy based on my fiddling with
creating projects.
Unfortunately for you, I don't get any exceptions when creating new
MimeMessages when I go to run my compiled app.
It works perfectly fine for me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY5wClDUvyTluGt3hGG_FqdYHmX40-FMks5tADkFgaJpZM4RA5v7>
.
|
You need to go into your Android and iOS project's Project Options and check the checkboxes for the various charset locales: |
Thanks for continouisly reply.
Error is still remains same.i checked that checkbox on both project.may I
request you can send me fully compiled code over the mail or as you won't.
…On 15 Dec 2017 8:14 am, "Jeffrey Stedfast" ***@***.***> wrote:
You need to go into your Android and iOS project's Project Options and
check the checkboxes for the various charset locales:
https://www.screencast.com/t/97OxahwPrg
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY5wCpF6mXNj3AE8rs-VbsEjNe_J3BHNks5tAd0OgaJpZM4RA5v7>
.
|
Here's the code that is somehow not catching System.NotSupportedException: static bool ProbeCharset (int codepage)
{
try {
Encoding.GetEncoding (codepage);
return true;
} catch {
return false;
}
} This seems impossible and yet it's not. This seems like a bug in Xamarin's iOS and Android runtimes, not a bug in MimeKit or MailKit. That catch clause should be catching all exceptions, but for whatever reason, it isn't. |
When I create a new Cross Platform Mobile App and select ".NET Standard" as my code-sharing option, my Android and iOS projects themselves are not ".NET Standard", but in your project, they are. In my project, I get no exceptions when I create a new MimeMessage. In your project, you do. I'm using the latest version of Visual Studio (15.5.2). What did you use to create your initial project from a template? |
In other words, when I create a new project, I end up with the following 3 projects:
Your project is like this:
This is probably what is causing things to fail. I don't know how you got your current project, but I know that at least iOS does not support being built as netstandard2.0 yet (I'm not sure of android). That's probably confusing the hell out of the Android and/or iOS runtimes and causing them to break. |
i did all the things, Moreover i used Portable.Text.Encoding to register
to encoding type. but position still remain same.
i need your help end this issue.
thanks for replay.
* Thank and regards*
*Sourabh Saini*
Software Engineer
Expert Tech Source Pvt Ltd.
333-334 A Tower,
Spaze IT Tech Park
Sector-49, Gurgaon (Harayna).
Mob. 07042507252
…On Fri, Dec 15, 2017 at 6:15 PM, Jeffrey Stedfast ***@***.***> wrote:
In other words, when *I* create a new project, I end up with the
following 3 projects:
- App# (which is .NETStandard 2.0)
- App#.Android (which is NOT .NETStandard 2.0)
- App#.iOS (which is NOT .NETStandard 2.0)
*Your* project is like this:
- App# (which is .NETStandard 2.0)
- App#.Android (which is .NETStandard 2.0)
- App#.iOS (which is .NETStandard 2.0)
This is probably what is causing things to fail. I don't know how you got
your current project, but I know that at least iOS does not support being
built as netstandard2.0 yet (I'm not sure of android).
That's probably confusing the hell out of the Android and/or iOS runtimes
and causing them to break.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY5wCuQSc8LpE6uNozbQndmRGSlWPeczks5tAmn5gaJpZM4RA5v7>
.
|
I can't help you because the problem is not with MimeKit or MailKit, it's a problem with your setup. You need the Android and iOS projects to not be netstandard2.0. Then it will work. |
I was send you my complied code two days ago.can you change that code as
your understanding or send New app where you use mimekit.and send to me
that code or new app over the mail or as your convenient.
I did all the solution but i didnot get any
success.this issue already posted on xamarin forum by me yesterday evening.
Thanks for your better reply.i hope you well help me again.
On 16 Dec 2017 2:35 am, "Jeffrey Stedfast" <notifications@github.com> wrote:
I can't help you because the problem is not with MimeKit or MailKit, it's a
problem with your setup.
You need the Android and iOS projects to not be netstandard2.0. Then it
will work.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY5wClUxtfaYloYJqOtrvTQ9iBAaYfhlks5tAt8ggaJpZM4RA5v7>
.
|
Issue Has been Resolved.
* Thank and regards*
*Sourabh Saini*
Software Engineer
Expert Tech Source Pvt Ltd.
333-334 A Tower,
Spaze IT Tech Park
Sector-49, Gurgaon (Harayna).
Mob. 07042507252
…On Thu, Dec 14, 2017 at 2:00 AM, Jeffrey Stedfast ***@***.***> wrote:
Or better yet, just zip up your project and send it to me (either via
email or link me to a dropbox or something).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#598 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AY5wCmLS6zM5A5sFtry9uSUE3bCtZ_t5ks5tADP_gaJpZM4RA5v7>
.
|
Hi Jeffrey, for weird reasons, apparently out of the blue, all of a sudden, I am experiencing this exact same error. As far as I know, there's no Chinese in my code or my data. The error occurs when I try the following.
System ==> .Net Fr. 4.5.2 (Mono) + MimeKit 2.0.0 and BC 1.8.1 + Mac OSX using Xamarin Studio (Visual Studio for OSX) The weird part is that this worked perfectly fine until just now ...??? I am not using .Net Core as far as I know ...?? |
Which version of Mono? There was a Mono runtime bug causing this a few months ago but was fixed in either 5.8 or 5.10 (I forget which) |
I am not sure, I am using Visual Studio for OSX (Xamarin Studio) with .Net Fr. 4.5.2 ... |
Sorry, my bad - Just completely ignore that one (blush!) |
In Xamarin Studio, if you go to the "Xamarin Studio" menu, click "About" and then in the About Dialog click the "Show Details" button in the lower right corner, it will give you a list of versions of all installed components. Mono should be at the top. For example, this is what mine says at the top:
The other possibility is that your project is referencing the netstandard nuget, but assuming that it's the the packages.config here: phosphorusfive/plugins/extras/p5.mime/packages.config then it looks like it references the net452 framework (which matches what you've been saying), which means it should be referencing the net45 assembly (MimeKit nuget packages do not include a 4.5.2 assembly). |
There was another bug in my code, and I set it to break on all exceptions, and an exception (which probably) was caught stopped my debugger at that point, while it actually was a completely different bug that was the cause ... Sorry (blush!) I should have done more research before jumping to conclusions ... :) Thx for the recipe of figuring out .Net version though ... |
Ah, ok :) |
System.NotSupportedException: No data is available for encoding 51936. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
The text was updated successfully, but these errors were encountered: