FIX gow.bat file generation

* change method of generating gow.bat to generate a normal ASCII character file

.# DISCUSSION

At the PowerShell command line, using `echo STRING > FILE` will generate a
UTF-8-BOM or UTF-16-BOM encoded file. But, CMD interprets files as using the
128-character ASCII character set (character codes 0 to 127). CMD will tolerate
files using the full 256 character "extended-ASCII" set (or even larger
dual-byte character sets). But, in this circumstance, interpretation/display
is dependent on the currently selected code page. It's best to stick to pure
ASCII files if at all possible.

Using `STRING | Set-Content FILE` instead creates the correct ASCII character file.

NOTE: ASCII (not "extended-ASCII") and UTF-8 (non-BOM) encoded files are exactly equivalent.

ref: [Unicode UTF and BOM] http://www.unicode.org/faq/utf_bom.html @@ https://archive.is/TKnyk
ref: [Unicode and NET] http://csharpindepth.com/Articles/General/Unicode.aspx @@ https://archive.is/czs89
This commit is contained in:
Roy Ivy III 2015-07-02 16:26:52 -05:00
parent 4fe9d57ed8
commit 0ef4806272

View File

@ -8,8 +8,10 @@
"url": "https://github.com/bmatzelle/gow/releases",
"re": "<a.*?>Gow ([0-9\\.]+)</a>"
},
"pre_install": "echo \"@cscript //NoLogo \"\"$dir\\bin\\gow.vbs\"\" %1\" > \"$dir\\bin\\gow.bat\" ",
"bin": [
"pre_install": "
\"@cscript //NoLogo \"\"$dir\\bin\\gow.vbs\"\" %1\" | Set-Content -force \"$dir\\bin\\gow.bat\"
",
"bin": [
"bin\\awk.exe",
"bin\\basename.exe",
"bin\\bash.exe",