Fix CodeRange to exclude hidenn characters at both ends.