I think we don't need the language check here, since in 1.8 mode every string should have the same encoding, so the second check would always be true and it would work properly.