-
-
Notifications
You must be signed in to change notification settings - Fork 607
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
utf8 filenames (with ulauts in filename) may appear broken inside container with nfs_mount_enabled #2048
Comments
I had this problem on a Manjaro host, specifically when PHP needed to deal with files containing UTF-8 characters. I solved it with this
HOWEVER, note that you might need code changes too in order to actually https://git.drupalcode.org/project/fillpdf/blob/8.x-4.x/src/ShellManager.php |
I confirm @wizonesolutions result on macOS with and without NFS and on Windows without NFS:
Unfortunately, on Windows with |
I'm trying to solve this problem with DDEV on Windows and using TYPO3 as content management system at the moment. |
Thanks @Kephson - I don't think you'll get proper utf8 filenames on Windows with winnfsd, but I do expect that one of the more sophisticated commercial nfs servers will work for you. IIRC it also probably works (mostly) without nfs, especially if you set the LANG as in #2048 (comment) |
Note that on Linux, it's actually called |
I bet it also depends on libc inside of container, there's great notes about Alpinelinux one https://wiki.musl-libc.org/functional-differences-from-glibc.html#Character-sets-and-locale |
I don't think there's any way for ddev to have any impact on this. |
Describe the bug
A user reports that when using
nfs_mount_enabled: true
on Windows, their filenames that contain ulauts are not shown correctly inside the container, at least by thels
command.So for example, on Windows or macOS host, in a project,
touch Mädchen.txt
.ls -l M*
shows it correctly on the hostddev ssh
andls -l /var/www/html/M*
ls -l
will report'/var/www/html/M'$'\303\244''dchen.txt'
Interestingly,
cp M<tab
will autocomplete withMädchen.txt
, seeming to mean thatls
doesn't handle utf8, but bash (or bash autocomplete) does. (echo M*
also shows correct filename, so it's bash reporting it correctly, ls doing it wrong).However, the filename being shown by ls is the correct byte-by-byte utf8 filename, just poorly shown.
PHP 7.2 and 7.3 also demonstrate correct behavior inside the container, using this script (readfile.php):
Version and configuration information (please complete the following information):
Additional context
It does seem that nfs v4 might fix this problem completely, and on Linux (Ubuntu 18.04) the problem doesn't show up at all. Stack Overflow article does say that macOS can't do nfs v4; the check
rpcinfo -p 127.0.0.1 | grep "nfs"
does show only versions 2 and 3, whereas on Ubuntu 18.04 it shows v4 also.The text was updated successfully, but these errors were encountered: