UnicodeEncodeError in logs


Has anyone encountered this error before.
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa3’ in position X: ordinal not in range(128)

I can provide the entire stack trace.
The error is occurring during the authentication ‘/validate/check’.
Could this be a bad character in the name, or pin of a user?

  • Quoc

Hi Quoc,

are you using the LDAP resolver? We recently fixed some bugs regarding non-ASCII characters in LDAP usernames (#738), but this isn’t part of a release yet.

However, I just had a quick look and there seem to be some remaining problems with non-ASCII characters in OTP PINs as well. I’ll look further into this.

Best Wishes


Hi Quoc again,

just wanted to let you know that we fixed some bugs with non-ASCII characters on the current master, e.g.

  • self-service login / otppin=userstore policy for users with non-ASCII usernames
  • non-ASCII OTP PINs

Maybe these fixes already solve your problem?



Hello @fredreichbier

I have not tried the latest content on master. Thank you for letting me know.

I will try out this, and let you know if anything comes up.

– Quoc