Support str type in email charset detection.