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

Allow changing the default Encoding used in S7String #435

Merged
merged 3 commits into from
Jun 17, 2022
Merged

Allow changing the default Encoding used in S7String #435

merged 3 commits into from
Jun 17, 2022

Conversation

ismdiego
Copy link
Contributor

The default Encoding.ASCII used in S7String to serialize and deserialize strings to/from byte array is not always valid in some situations where you want to use extended ASCII Code Pages, like the Windows 1252, or Iso-8859-1.

This simple PR allows user to change the Encoding system-wide, using an static property directly on the S7String class. I do not know if a central configuration already exists and this setting can be moved there. That would be nicer than this quick'n'dirty fix.

…alize S7String, instead of always using Encoding.ASCII
@ismdiego
Copy link
Contributor Author

Last time I did a PR the appveyor part also failed. Should I take anything more into consideration when creating the PR? I think it's my fault...

@gfoidl
Copy link
Collaborator

gfoidl commented Jun 17, 2022

I think it's my fault...

It's not your fault, and you can't do anything here. The failure is

GitVersion.BugException: GitVersion has a bug, your HEAD has moved after repo normalisation.

@mycroes
Copy link
Member

mycroes commented Jun 17, 2022

Thx guys. Yes GitVersion has some issues, might look into that at some point...

@mycroes mycroes merged commit 7f76d4f into S7NetPlus:develop Jun 17, 2022
@mycroes
Copy link
Member

mycroes commented Jun 17, 2022

Released as 0.14.0, thanks again!

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.

4 participants