[1.5.x] Fixed #19725 -- Made createsuperuser handle non-ascii prompts

Thanks Michisu for the report.
Backport of 55c585f1c from master.