Skip to content
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

Support for ISO-8859-1 #429

Merged
merged 7 commits into from
Feb 12, 2020

Conversation

microknights
Copy link
Contributor

Today SoapCore only supports encoding of utf-8, utf-16 (+le/be), and not any legacy like ISO-8859-1.

So when starting the SoapCore consuming part like this:

            var soapEncoder = new SoapEncoderOptions
            { 
                WriteEncoding = Encoding.GetEncoding("ISO8859-1"),
                MessageVersion = MessageVersion.Soap11
            };
            app.UseSoapEndpoint<IMySoapConsumer>("/my/soap/consumer", soapEncoder,  SoapSerializer.XmlSerializer);

Will end in a exception, since XmlDictionaryReader.CreateTextReader only support the mentioned encodings.

This PR makes it so it falls back to XmlReader which has no encoding restrictions, and thereby support ISO-8859-1.

@kotovaleksandr
Copy link
Member

Hi @microknights! Thanks for your contributing! Can you add unit tests for this change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants