gregneagle / pycreateuserpkg

Python tool to create macOS packages that create user accounts
Other
292 stars 44 forks source link

Decode full name and hint with UTF-8 #63

Open choules opened 3 years ago

choules commented 3 years ago

We had problems with German umlauts with user's full names when creating accounts using pycreateuserpkg. The changes made here have solved the problem for us and may be helpful for other users as well.

Since I have no real experience with UTF-8 support in Python 2.7 this may not be the ideal solution...

gregneagle commented 3 years ago

This looks like the right solution for Python2 at least. I want to test under Python3 as well. Could you provide some sample input that triggers the problem? I suppose a name like "Schröder" would do it?

(I only ever imagined this tool being used to create local admin or utility accounts and not for general-purpose user accounts, so I'm sure there are more issues lurking. What if people use umlauts and other non-ASCII characters in the password, or short name, or....)

choules commented 3 years ago

In our case the user's full name was "Benutzer für Präsentationen", so a generic account for presentation purposes. The change would be required at least for the password, as well – but this was not necessary for our use case.

choules commented 3 years ago

I have tested it with the character "ß" in the full name and hint fields, too.