Tiax
Tiax

Reputation: 269

Java (Groovy) LDAP Non-ASCII Characters

I've been googling my ass off without any success. So I came here. Hope someone can help me out! Im using Groovy to do some LDAP searches but when a person has å, ä or ö in their names I get for example Jens R√§fteg√•rd. I've tried:

new String(attrs.get("name")?.get(0)?.getBytes(), "UTF-8")

And even tried:

def charsets = Charset.availableCharsets() charsets.each() { key, value -> value.aliases().each() { alias -> println new String(attrs.get("name")?.get(0)?.getBytes(), alias) } }

Anyone got a clue?

Upvotes: 1

Views: 555

Answers (1)

Tiax
Tiax

Reputation: 269

If anyone's interested it was the Grails Shiro-plugin whom messed with the encodings. Fixed now!

Upvotes: 1

Related Questions