remote-hg: make sure the encoding is correct