Missing ‘a’ character on Windows with rspec and cucumber
Trying to get a windows rails environment going this morning I stumbled upon something interesting – all ‘a’ characters were missing from cucumber and rspec output.
Everything comes down to having change encoding in the current cmd window. This is achieved via a simple call to
chcp 1252, but nobody want’s to do this every time, right?
To get this executed automaticaly and without resorting to serious registry editing, simply add this line to your
cucmber.bat and any other batch files that are exhibiting this problem. You can find
cucumber.bat in your
Here’s what it looks like:
chcp 1252 @ECHO OFF IF NOT "%~f0" == "~f0" GOTO :WinNT @"ruby.exe" "c:/ruby/bin/cucumber" %1 %2 %3 %4 %5 %6 %7 %8 %9 GOTO :EOF :WinNT @"ruby.exe" "%~dpn0" %*