Issue with renaming user with unicode characters

Latest. Which should be 2.9.0.beta12 at the moment.

Yes. Just renamed the container name as I plan to run more than one discourse instance. But at the moment it is only one running.

Apache 2.4

Chrome, Brave.

[äöüßÄÖÜẞ]

It does not work either:

=> "Wägi"
[6] pry(main)> UsernameChanger.change(user, new_username, Discourse.system_user)
Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
from /var/www/discourse/plugins/discourse-migratepassword/plugin.rb:78:in `+'

Here I tried “Waegi” to “Wägi”.

What I noticed: I use a new template version for the container which holds the following information:

env:
  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8
  LANGUAGE: en_US.UTF-8
  DISCOURSE_DEFAULT_LOCALE: de

In the old template (2019 or so) there only was:

env:
  LANG: en_US.UTF-8
  DISCOURSE_DEFAULT_LOCALE: de

Does this maybe have to do with the problem? And are these the right settings for a Discourse installation with main language German?

Oh and I noticed now that the error is thrown by discourse-migratepassword - which was the reason why I renamed the users before importing everything from phpBB to Discourse.

Would it be useful to disable discourse-migratepassword, rename the users and then enable it again? What else is handled by discourse-migratepassword that it needs to be active after the import from phpBB?