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

Add UTF8 #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add UTF8 #32

wants to merge 1 commit into from

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