Enconding problems for query parameters in log_action


We have an on premises installation for a Swedish website and everything works just fine with the encoding of the Swedish characters å, ä and ö. Except for when it is used in the as values for the search query. Then for example Björn is saved as Bjërn in the name column of the log_action table.

The type for all values that have problems are 8 which I guess is the type for query.
If the type is not 8 all characters work just fine.

What could cause this?