Special character in username

Hello, we have a standalone Keycloak server having user accounts contain latin letter with diaeresis, i.e. ä

The credential is working when I login the account on web portal correctly
/auth/realms/{realm}/protocol/openid-connect/auth?client_id=account&....

But when I use REST API calling /auth/realms/{realm}/protocol/openid-connect/token
to grant access token for the same user account , it failed with the following error
{ "error": "invalid_grant", "error_description": "Invalid user credentials" }

On the server log I saw this request looked up the userId but I have no idea why it was an invalid grant
2021-01-21 01:10:36,057 WARN [org.keycloak.events] (default task-29) type=LOGIN_ERROR, realmId={realm}, clientId={clientId}, userId=7e74c3b9-4a0b-44ec-841e-2fc7cbb7af72, ipAddress={ip_address}, error=invalid_user_credentials, auth_method=openid-connect, grant_type=password, client_auth_method=client-secret, username=test_ä

Is there anything I did incorrect?

Try to URL encode username (generally any parameter should be url encoded if it contains some special characters).