-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: NC24 + PHP8.1 break UTF-8 compatibility #31212
Comments
there was a similar issue earlier, not sure if related: #29296 |
@ambraspace So after looking into it this comes from a change in PHP itself which tried to get better at autodetecting encodings. We are looking into not autodetecting encoding if it is valid UTF-8 but it is not clear yet if this is the right path. |
@come-nc I encountered this in real life use case. Letters šđčćž are quite common in Slavic languages (Serbian, Croatian, Slovenian, Slovak, Czech and such). Probably more then 90% names in Serbian language end with "ić". I thought everything is UTF-8 by default these days... |
Then can you state so and give real life examples in php/php-src#8279 ? |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This issue has practically borked my entire NC installation: it affects Turkish undotted-i (ı) as well. I initially reported it as a client issue here but it turns out just the server by itself is also problematic. The UI sometimes shows these directories as scrambled, sometimes crashes on trying to open them (click on folder, UI jumps back to default login page), etc. |
Also note this isn't NC24, NC23 is broken too, the key is PHP 8.1. I just fired up a dedicated PHP 7.4 FPM socket for Nextcloud 23 and got my instance unborked with it. |
Confirming that setting PHP back to 8.0 (and running |
I also can confirm, that PHP 8.1 not works for my installation. I am on Arch linux, NC24, names of files are mainly in Slovak. I did downgrade PHP to 7.4 scan the files like PaulosV and I am OK. |
Confirming on Ubuntu 22.04 with default install of PHP 8.1. After installing PHP 8.0 everything seems to be ok. |
The mail app bug Add PHP 8.1 support also addresses this issue. The proposal in PHP bug #32481 is:
Note that as of today, the PHP manual page on mb-detect-encoding does not honor the behavior change from PHP 8.0 to 8.1 yet. |
@nursoda Yes we are going to switch to mb_check_encoding but that needs to be done in sabredav and not Nextcloud. |
This is very annoying problem... Operating System PHP |
Newest NC 24.0.3 includes sabre/dav 4.4.0. Can someone confirm if it's working properly now? |
Same problem with baltic characters. migrated to nc 24.0.3 and PHP 8.1.2 from nc 22.2.0, PHP 7.4.3 |
as far as I can see the fix is only on master / NC 25. the backport for NC 24 with the library update is still open: nextcloud/3rdparty#1109 |
It seems that the problem is fixed in 24.0.4! |
glad to hear! please upgrade to 24.0.4 as it contains the required library update |
@Japaanc As in PHP 8.1 support now? Nothing about that in the changelog, seems like something that should be news if so ;-) |
@alerque I,m at this moment using "PHP 8.1.2 (cli) (built: Jul 21 2022 12:10:37) (NTS)". no problems at this moment. |
PHP 8.1 support was already in place for NC 24 and this ticket was the last issue that popped up, so in the changelog it might appear as bumping the sabre lib (the changelogs of patch versions are automated) |
Bug description
Due to changes introduced in PHP8.1 creating files or directories with non-ascii characters result with problems such as:
I'm guessing it's this change from PHP change log:
Actually, not being able to edit or delete files have been problem with Arch patched version of NC23 and PHP8.1. With NC24+PHP8.1 I am able to edit or delete text file, but the file name is not properly displayed.
I also noticed that a few contact names with non-ascii characters in name have not been displayed correctly.
Steps to reproduce
Expected behavior
The file which has non-ascii characters in file name should be displayed as entered by a user (i.e. to fully support UTF-8 character set).
Installation method
Manual installation
Operating system
Other
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: