adapt regtest to -onebyteencoding