rescue CharDet.detect