Fix win pkg encoding

Fixes #5450