On Windows the AUTO encoding is based on the console code page, so run the test in an isolated console window.