cli: also accept "detect" as encoding for old behavior