Workin' on our blog moves

So, plodding through the work (originally 'word'..) day as best I can.

My latest Windowsian disappointment is seemingly not finding a Powershell way to have “Write-Output” output ASCII instead of whatever the fuck it does (slight suspicions it's utf8, but I'll be compiler fucked if I can find documentation stating so explicitly). (There's shit one can do to make the likes of “Out-File” respect other encodings, but of course not the function I really need.. and I'm not going through some monkey-wrenching courtesy of some goddamned intermediate file to make it happen....)

So I tried a bunch of iconv experiments (with the -f and -t flags), but to no satisfying results.

I had a funny hunch there must be a Lua way... but that led to floundering until I started wondering if all the 0x00's (per “od -Ax -tx -v” output) were considered what Lua calls “control characters”.

And... voila.. this mostly does what I needed:

#! /usr/bin/env lua
for line in io.stdin:lines() do
    line = string.gsub(line, '%c', '')
There's still one 0xfe and one 0xff in the output (which seem to be copy/paste artifacts...?), but I'll not pursue what will likely turn into a gargantuan experimentation effort for just minimal results – i.e. I'll just live with it.