Skip to content
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

[OC 10.0][OS X] libsync is able to download files with 4 byte-unicode names but upload etc #5661

Closed
3 tasks done
SamuAlfageme opened this issue Mar 28, 2017 · 9 comments
Closed
3 tasks done
Labels
bug p2-high Escalation, on top of current planning, release blocker ReadyToTest QA, please validate the fix/enhancement sev3-medium
Milestone

Comments

@SamuAlfageme
Copy link
Contributor

SamuAlfageme commented Mar 28, 2017

4 byte-unicode (a.k.a. emoji) filenames are supported in ownCloud 10.0 (owncloud/core#4513)

Expected behavior

The client should be able to handle this filenames as long as the underlying filesystem supports them as well.

Actual behavior

  • Sync a file/folder with an emoji filename from the server into the desktop client (v2.3.1)
  • Upload a file/folder to the server with a 4byte-unicode name prompts this error
  • Delete/rename the file/folder on the server, the client doesn't keep up with these changes

Solving this will be enough to close some old issues:

@guruz guruz modified the milestones: 2.3.1, 2.3.2 Mar 28, 2017
@guruz guruz added the p2-high Escalation, on top of current planning, release blocker label Mar 28, 2017
@guruz
Copy link
Contributor

guruz commented Mar 28, 2017

Note that this might be macOS specific because we have to do file name mangling on macOS https://github.com/owncloud/client/search?utf8=%E2%9C%93&q=normalization&type= .

How does it look on other OS?

@michaelstingl this would mandate an earlier 2.3.2

@SamuAlfageme
Copy link
Contributor Author

@guruz you're right, I assumed the name-conversion error was platform-independent but just tried with Win10 and no flags were raised there. My bad 😅

@SamuAlfageme SamuAlfageme changed the title [OC 10.0] libsync is able to download files with 4 byte-unicode names but nothing else [OC 10.0][OS X] libsync is able to download files with 4 byte-unicode names but nothing else Mar 28, 2017
@michaelstingl
Copy link
Contributor

@michaelstingl this would mandate an earlier 2.3.2

Works for me

@ogoffart
Copy link
Contributor

ogoffart commented Mar 29, 2017

I bet that's because iconv can't convert the string on macOS (cf. #2777 )

i.e: c_utf8_from_locale returns a null string in csync_vio_local_readdir. (because the iconv call itself returns null in c_iconv)

This used to block the whole sync before commit f6cd2c7, but now such file are simply ignored.

So I believe this is a bug in iconv. Maybe we simply need to update iconv.
Alternatively, we should not use iconv at all and use a callback from the Qt code to convert from "UTF-8-MAC", whatever that is. (i guess that's NFD vs. NFC normalisation)

@guruz
Copy link
Contributor

guruz commented Apr 19, 2017

Maybe we simply need to update iconv.

We use the system iconv.

@ogoffart Any proposal for your Qt code?
Alternatively 2: Instead of using POSIX/csync _treaddir we could use something from Qt for reading directories.

@guruz
Copy link
Contributor

guruz commented Apr 19, 2017

@guruz
Copy link
Contributor

guruz commented Apr 19, 2017

This is messy. I'm trying a few things but I think this is too invasive for a patch release.

@guruz guruz changed the title [OC 10.0][OS X] libsync is able to download files with 4 byte-unicode names but nothing else [OC 10.0][OS X] libsync is able to download files with 4 byte-unicode names but upload etc Apr 19, 2017
guruz added a commit that referenced this issue Apr 19, 2017
@guruz
Copy link
Contributor

guruz commented Apr 21, 2017

@michaelstingl @pmaier1 Moving to 2.4, the needed patch is too invasive

@guruz guruz modified the milestones: 2.4.0, 2.3.2 Apr 21, 2017
ogoffart added a commit that referenced this issue Jul 4, 2017
Issues:
 - #5661   On mac, iconv did not support all of unicode and some
           files with emoji in the filename could not be uploaded

 - #5719 , #5676  On linux, we will now support non utf-8 locale
ogoffart added a commit that referenced this issue Jul 13, 2017
Issues:
 - #5661   On mac, iconv did not support all of unicode and some
           files with emoji in the filename could not be uploaded

 - #5719 , #5676  On linux, we will now support non utf-8 locale
@ogoffart ogoffart added the ReadyToTest QA, please validate the fix/enhancement label Jul 17, 2017
@SamuAlfageme
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p2-high Escalation, on top of current planning, release blocker ReadyToTest QA, please validate the fix/enhancement sev3-medium
Projects
None yet
Development

No branches or pull requests

4 participants