Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix WINDOWS-8 UTF-8 username encoding #565

Closed
wants to merge 1 commit into from
Closed

fix WINDOWS-8 UTF-8 username encoding #565

wants to merge 1 commit into from

Conversation

sylvainmouquet
Copy link

Before

>>> psutil.users()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Démo\Desktop\psutil-2.1.3\psutil\__init__.py", line 1820,
in us
ers
return _psplatform.users()
File "C:\Users\Démo\Desktop\psutil-2.1.3\psutil\_pswindows.py", line
184, in u
sers
rawlist = cext.users()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1:
invalid
continuation byte

After:

>>> psutil.users()
[suser(name='Démo', terminal=None, host='0.249.23.1',
started=1419776716.0)]

>>> psutil.users()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Démo\Desktop\psutil-2.1.3\psutil\__init__.py", line 1820,
in us
ers
return _psplatform.users()
File "C:\Users\Démo\Desktop\psutil-2.1.3\psutil\_pswindows.py", line
184, in u
sers
rawlist = cext.users()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 1:
invalid
continuation byte

>>> psutil.users()
[suser(name='Démo', terminal=None, host='0.249.23.1',
started=1419776716.0)]
@giampaolo
Copy link
Owner

Fixed as of e93f2cc. Thanks.

@giampaolo
Copy link
Owner

#508 was a duplicate of this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants