correctly handle 'C.UTF-8' locale

fixes #57