Open code-surfer opened 1 year ago
I cannot reproduce that, but haven't tried the community docker image yet. Any chance you can share a copy of such a file here as an attachment for checking the file encoding directly?
The file is fine, I thoroughly checked the encoding.
It is also displaying fine in the Nextcloud Android app.
The problem is in the dual pane Markdown editor that opens when I click the file in .../index.php/apps/files?dir=/Notizen/Medien&openfile=122800
which gets me to .../apps/files/?dir=/Notizen/Medien&fileid=88758#filestexteditor
.
# cat vol/nextcloud/data/rj/files/Notizen/Medien/test.md
test äöü ⚰
# recode utf8..dump < vol/nextcloud/data/rj/files/Notizen/Medien/test.md
UCS2 Mne Description
0074 t latin small letter t
0065 e latin small letter e
0073 s latin small letter s
0074 t latin small letter t
0020 SP space
00E4 a: latin small letter a with diaeresis
00F6 o: latin small letter o with diaeresis
00FC u: latin small letter u with diaeresis
0020 SP space
26B0
Only when I edit the file and the editor saves it, then the encoding gets messed up. I removed the symbol that triggers the bug, but still:
# cat vol/nextcloud/data/rj/files/Notizen/Medien/test.md
test äöü
# recode utf8..dump < vol/nextcloud/data/rj/files/Notizen/Medien/test.md
UCS2 Mne Description
0074 t latin small letter t
0065 e latin small letter e
0073 s latin small letter s
0074 t latin small letter t
0020 SP space
00C3 A? latin capital letter a with tilde
00A4 Cu currency sign
00C3 A? latin capital letter a with tilde
00B6 PI pilcrow sign
00C3 A? latin capital letter a with tilde
00BC 14 vulgar fraction one quarter
I restored the file. Here is the base64-encoded content for your diagnostics:
# base64 vol/nextcloud/data/rj/files/Notizen/Medien/test.md
dGVzdCDDpMO2w7wg4pqwCg==
By the way, the bug is not triggered by every character beyond U+00FF. With the € U+20AC it works fine. Same with ✄ U+2704. But with ⚰ U+26B0 it breaks.
Code point | Result |
---|---|
20AC | fine |
26A5 | broken |
26AF | broken |
26B0 | broken |
26B1 | broken |
26B2 | broken |
26FF | fine |
2704 | fine |
Ah, you are using a different app then, let me move the issue
⚠️ This issue respects the following points: ⚠️
Bug description
After upgrading nextcloud to 26.0.5, I noticed that some Markdown files are shown with broken encoding in the editor. They were fine in many nextcloud versions up to 23.0.12. I updated in steps to 26.0.5. I also updated to 27.0.2, but the bug persists.
All files are encoded in UTF-8. I've tracked it down to: when I add a character ⚰ (U+26B0) it breaks. With äöü in the file, it displays correctly. With äöü⚰ in the file, it displays as äöü⚰ The files on the filesystem are fine. It's a problem with the nextcloud files editor.
I've used docker images nextcloud:23-fpm .. nextcloud:27-fpm
Steps to reproduce
test äöü
⚰
. Still looking finetest äöü ⚰
Expected behavior
The file show display correctly as it did in older nextcloud versions.
Installation method
Community Docker image
Nextcloud Server version
27
Operating system
Debian/Ubuntu
PHP engine version
Other
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 22 to 23)
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
No response
Additional info
No response