Skip to content
This repository has been archived by the owner on Feb 19, 2019. It is now read-only.

Fix non-ASCII characters + add Chocolatey-Version tests #497

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jberezanski
Copy link
Contributor

Chocolatey-Version.ps1 uses dash characters that are not standard ASCII minus signs, but Unicode "en" dashes (probably caused by copy-pasting from a word processor) in command invocations. The Powershell parser actually handles it, but some text manipulation tools have problems.

InstallChocolatey.ps1 contains an invalid sequence of bytes that once represented the copyright character, but got corrupted. Replace it with plain ASCII "(c)".

Also add some smoke tests for Chocolatey-Version.

In commit dcfb750, the copyright character (Windows-1252 0xA9) somehow got
replaced with three bytes EF BF BD, which, despite resembling UTF-8, do
not encode a valid Unicode codepoint (U+FDFF is undefined).

Replace those bytes with simple ASCII (c) to keep Chocolatey code
character set as generic as possible.
En dashes (U+2013) usually appear when writing code snippets in word
processors or html editors, which make an effort to replace minus signs
with nicer looking en and em dashes. Nicer for text documents, but not for
code.

PowerShell actually tolerates en dashes, but some text manipulation tools
do not. Moreover, those are the only symbols outside of ASCII charset in
Chocolatey code.

Replace them with standard minus signs.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant