Selection of input encoding