Uh oh!
There was an error while loading. Please reload this page.
Avoid use of iconv to get rid of unicode - #29470
Conversation
Using iconv for translit depends upon server configuration, locale, and PHP version. Using htmlentities instead to have a consistent behavior independent of configuration. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
come-nc
commented
Oct 28, 2021
This appears to be Symfony >= 5 only and we use 4 for now. |
Uh oh!
There was an error while loading. Please reload this page.
I did not find any test data that would fail with the previous regex, but still added data with uppercase to at least test that. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Generally I like getting rid of dependencies when they are used in a single case only, which is not even used on every Nextcloud instance (LDAP) and where an own solution doesn't involve tons of code. Checking the server repository code, it seems to be indeed the only case: https://github.com/nextcloud/server/search?q=iconv I ran a Furthermore, iconv brings own issues, aside of this particular one that it may or may not work based on systems locale: Also I don't think that there will be any new kinds of special characters included regularly so that this code should not require constant maintenance, and with So basically it looks like removing Leaving this as opinion, but I won't approve as I think two guys with more insights should evaluate implications I might overlook. |
MichaIng
commented
Nov 29, 2021
/backport to stable23 |
MichaIng
commented
Nov 29, 2021
/backport to stable22 |
MichaIng
commented
Nov 29, 2021
/backport to stable21 |
The backport to stable22 failed. Please do this backport manually. |
The backport to stable23 failed. Please do this backport manually. |
The backport to stable21 failed. Please do this backport manually. |
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
MichaIng
commented
Nov 29, 2021
PR up to consequently remove the module from dependencies and tests: #29958 |
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
The usage of iconv has been removed in: nextcloud/server#29470 The dependency has been removed in: nextcloud/server#29958 Signed-off-by: MichaIng <micha@dietpi.com>
The usage of iconv has been removed in: nextcloud/server#29470 The dependency has been removed in: nextcloud/server#29958 Signed-off-by: MichaIng <micha@dietpi.com>
The usage of iconv has been removed in: nextcloud/server#29470 The dependency has been removed in: nextcloud/server#29958 Signed-off-by: MichaIng <micha@dietpi.com>
The usage of iconv has been removed in: nextcloud/server#29470 The dependency has been removed in: nextcloud/server#29958 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
which is not used anymore since: #29470 Signed-off-by: MichaIng <micha@dietpi.com>
Remove iconv patch: nextcloud/server#29470
Remove iconv patch: nextcloud/server#29470
Using iconv for translit depends upon server configuration, locale, and PHP version.
Using htmlentities instead to have a consistent behavior independent of configuration.
In theory using iconv for translit is better because it can do smart things like turing ä to ae or ß to ss, but in practice that only works if you know which locale to set before calling iconv, which we cannot know for usernames.
I did not remove the iconv dependency check as I am not sure if this is our only use of iconv?
Also, I found this in Symfony, which could be used instead of having our own code for this: https://symfony.com/doc/current/components/string.html#slugger