milux / ctldap

LDAP Wrapper for ChurchTools
GNU General Public License v3.0
12 stars 8 forks source link

Umlaut #4

Closed corbinucode closed 6 years ago

corbinucode commented 6 years ago

Hi,

Within our installation of ChurchTools, group titles can contain umlauts. They can cause problems when connecting Apps like NextCloud to ctldap.

I've extended ctldap.sh by a function that converts umlauts to their replacements (e.g. "Ü" to "Ue").

Could that be useful for more users (maybe selectable with a config-toggle)? If so, how would be the best way to contribute it? Using a pull request or just pasting the changes here?

Cheers Ulrich

tomzi8571 commented 6 years ago

@milux Maybe you could add sth like this: https://stackoverflow.com/questions/18123501/replacing-accented-characters-with-plain-ascii-ones

milux commented 6 years ago

Hey Ulrich, we have various groups with Umlauts, too. And as far as I can see, this is not a problem at all, since everything is UTF-8. Groups are shown correctly in JXplorer, NextCloud LDAP plugin and NextCloud itself. If they don't show correctly for your use case, than this might be some configuration issue in your client. I will definitely not introduce any crappy transformations like this, no way!

tomzi8571 commented 6 years ago

I think that the problem that @corbinucode mentioned, was that one of the services we used via the ctldap didn't play well with Umlauts. When we fixed the sourcecode to transform those Umlauts it worked just fine. That's why we thought it would make sense to have this as an option in the ctldap config. The same way you can set as an option to lowercase the result there could also be a configuration to transliterate a certain set of characters, like all nonascii characters for example... This way everyone could decide for himself to use this feature or not... (We needed it ... :))

milux commented 6 years ago

Yeah, I'm aware of that. However, I have tons of important/useful things to do at the moment. Therefore, if I touch the code again, I want to see my time invested for something meaningful. @corbinucode explicitly mentioned NextCloud, which works fabulously with German umlauts. If it doesn't, than that's a clear indicator for a screwed-up config, and I won't help to fix crap with even more crap. (Sorry, no offence!) If somebody comes up with a use case that really requires such a feature, I might consider investing time for that.

milux commented 6 years ago

Apart from that, you can use GitHub's PR function to suggest your "patch" for inclusion. If I find that it is sound and complete, I will include it.