pycreateuserpkg icon indicating copy to clipboard operation
pycreateuserpkg copied to clipboard

Decode full name and hint with UTF-8

Open choules opened this issue 4 years ago • 3 comments

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...

choules avatar Jun 28 '21 12:06 choules

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....)

gregneagle avatar Jun 28 '21 15:06 gregneagle

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 avatar Jun 28 '21 15:06 choules

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

choules avatar Jun 28 '21 15:06 choules