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 encoding parameter #268

Closed
gandhis1 opened this issue Jun 2, 2021 · 1 comment · Fixed by #275
Closed

Support encoding parameter #268

gandhis1 opened this issue Jun 2, 2021 · 1 comment · Fixed by #275
Labels

Comments

@gandhis1
Copy link

gandhis1 commented Jun 2, 2021

The encoding parameter accepts an Encoding value, such as Encoding.UTF8. However when I put it in my appsettings.json the conversion does not work:

System.InvalidCastException: "Invalid cast from 'System.String' to 'System.Text.Encoding'"

I'm surprised something so basic is not supported, so am I doing something wrong, or is it actually not supported?

Edit: I thought this was an enum, it actually isn't, it's a singleton....

@skomis-mm
Copy link
Contributor

skomis-mm commented Jun 6, 2021

Hi @gandhis1 ,
correct syntax for such parameter is System.Text.Encoding::UTF8

We should update the documentation regarding this.
HTH!

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

Successfully merging a pull request may close this issue.

2 participants