ox-it / munki-rebrand

Script to rebrand Munki's Managed Software Center
BSD 3-Clause "New" or "Revised" License
88 stars 24 forks source link

Special characters #28

Closed o-jans closed 5 years ago

o-jans commented 5 years ago

Hi fuzzylogiq, nice to see an updated version. But munki-rebrand 3.0 does not work with special characters like 'ü'. Example:

sudo ./munki_rebrand.py --appname "Name" Downloading munkitools from https://github.com/munki/munki/releases/download/v3.6.0/munkitools-3.6.0.3733.pkg... Replacing app name with Name... Building output pkg at /Users/name/Documents/munki-rebrand-3.0/munkitools-3.6.0.3721.pkg... Cleaning up... Done.

sudo ./munki_rebrand.py --appname "Nüme" Downloading munkitools from https://github.com/munki/munki/releases/download/v3.6.0/munkitools-3.6.0.3733.pkg... Replacing app name with Nüme... Traceback (most recent call last): File "./munki_rebrand.py", line 518, in main() File "./munki_rebrand.py", line 456, in main replace_strings(lfile, code, args.appname) File "./munki_rebrand.py", line 239, in replace_strings fw.write(line) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 23: ordinal not in range(128) Cleaning up... Done.

fuzzylogiq commented 5 years ago

Please try the fix in this branch:

https://github.com/ox-it/munki-rebrand/tree/unicode-fix

o-jans commented 5 years ago

The fix is working. Thanks.