fixed dependency on default system charset

causing some tests to fail on MacOS