efi: Move unicode to ASCII conversion to shared function.