DNN-5789 fix issue in upgrade script that caused issues with unicode characters when upgrading