Re: Umlaut (Ü, Ä, Ö) in attribute resolution not UTF-8 encoded
Cantor, Scott
cantor.2 at osu.edu
Thu Feb 13 18:32:00 UTC 2025
> Also, I got it working, but I don't consider my current solution
> a good one. I changed the SQL Query in my attribute-resolver
> config to: SELECT email,forename,CONVERT(surname USING
> utf8) AS surname FROM moodle2_auth WHERE
> username='$resolutionContext.principal'
If the IdP handles the data coming in as Unicode in that case, then it seems pretty clear it's not coming in as Unicode in the original case.
The JDBC API is based on String, so the encoding has to be applied before it reaches that point. There are no inputs to the result set call that take a Charset (that I can see) as would have to be present for the API to support a conversion on the fly.
That all but eliminates any other source of the issue but the database or driver, and that's out of scope for me here.
I'd be looking deeper at the DataSource bean and any driver docs, for any relevant settings other than the more obvious ones.
I guess it's also possible it isn't using the connection string you think it is.
-- Scott
More information about the users
mailing list