External Storage, "Local": Severe problem with UTF8 (NFD?) encoding in filenames

Context:

Client wants to make selected files and folders from an onsite Windows file server available via web. Their IT support implemented a nightly file upload (tools / script unknown) to the webserver via SFTP which replicates the folder structure in ../htdocs/mountpoints/fs_01. We want to use Nextcloud to make selected (sub-) folders available, using the External Storage App and local mountpoints.
(Restriction: Files cannot be uploaded directly via Nextcloud web or the Nextcloud client software)

Problem:

While most of the files and folders from the “external storage” are accessible for sharing, foldernames with a special character (mainly german Umlauts: ÄÖÜäöü) will not appear in the Nextcloud File App.

This seems to be due to problematic filename encodings. As mentioned here https://github.com/owncloud/core/issues/21365#issuecomment-176688606 Nextcloud / owncloud does seem to have mechanisms to handle UTF8-NFD coded filenames, in this case the mechanisms fail though.

I’m not sure if this is an issue that can be tackled within Nextcloud, but here’s how one of the foldernames “ÄCW” looks in the terminal on Solaris 5.10 (via tcsh: ls -la):
''$'\304''CW'

You can see some corresponding PHP errors in the log file that occur if one tries to mount the folder directly.


During testing, I encountered a similar, maybe connected issue using OSX and Transmit this time. When creating files via Transmit directly on the server (example: “06_täst.txt”), Umlauts are ok for Nextcloud to process. Once I edited a file locally and reuploaded that (“04_täst.txt”), it won’t be accessible in Nextcloud as well (this time maybe running into the aforementioned OSX NFD encoding problem?). Here’s the tcsh output:

'04_ta'$'\314\210''st.txt' (not working)
'06_t'$'\303\244''st.txt' (working)

(tcsh might make it more complicated to reproduce due to (seemingly) missing support for proper UTF8 chars. Unfortunately I cannot change that, since it’s a Shared Hoster and there’s no way for me to configure the environment)

Both these issues (with the Windows files as well as with the OSX files) happen regardless of the External Storage setting “Compatibility with Mac NFD encoding (slow)”.

If anyone is able to wrap their heads around this and how to narrow down the issue to

  1. being a bug in Nextcloud or
  2. being an issue with the server environment or
  3. being an issue with the upload process / Windows source

that would be greatly appreciated!


Details:

Nextcloud version: 12.0.0.29 + 11.0.4 (even ownCloud 10)
Operating system and version: Solaris 5.10 (Shared Hosting)
Apache or nginx version: Apache/2.2.31
PHP version: 7.0.22
Is this the first time you’ve seen this error?: Yes


Logs

(Some) of the output of my Nextcloud log in Admin > Logging:
https://hastebin.com/katakunihe.log

The output of my config.php file in /config/config.php:
https://hastebin.com/evedirewaz.php


Addendum:

The problem with the OSX files is reproduceable on a Digital Ocean Droplet (Nextcloud 11.0.1 on Ubuntu 16.04.2) which will only show “06_täst.txt” regardless of any compatibility settings.

This is another bump. Can anyone help?