Skip to content

Conversation

@alxcreate
Copy link

@alxcreate alxcreate commented Jul 24, 2024

Requirements

  • Written new test cases to ensure no regression bugs occur?
  • Ensured all test cases are now passing?
  • Ensured that PowerShell Script Analyser issues and warnings are completely resolved?
  • Updated any help or documentation that may be impacted by your changes?

Description of the Change

Added the ability to specify the Encoding parameter to choose between ASCII or UTF8 encoding. If the parameter is not specified, ASCII will be used by default. Specifying this parameter is important when the message text contains non-ASCII characters. Without it, the received message may be displayed incorrectly. For example, the text might be displayed as "?" characters.

Usage example:

Send-SyslogMessage -Server hostname -Message "Test" -Severity Alert -Facility local0 -Encoding UTF8
This command will send a message using UTF8 encoding.

Testing

The tests verify the correct encoding of non-ASCII characters after converting back to text.

Associated/Resolved Issues

Wrong non-ASCII chars in messages.

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.

1 participant