-
Notifications
You must be signed in to change notification settings - Fork 30
Known bugs and features
This in not a bug/issue with yandex-disk daemon or Indicator. This is the feature related to file-systems: NTFS provides 256 symbols for a filename (symbols are stored in UTF-16 encoding, the 512 bytes is allocated for any filename). EXT4 and many other linux file-systems provides 256 bytes for a filename (symbols are stored in UTF-8 encoding)
When You use only latin symbols in filenames - there is no difference in maximum filename length between NTFS and EXT4 - both can handle files with filenames length up to 256 symbols.
But when You use any national symbol in filename the difference appears:
- UTF-8 encoding stores most of national symbols into 2, 3 or 4 bytes each (or even 5 or 6 bytes in theory). This reduces the number of symbols that can be placed into reserved 256 bytes.
- UTF-16 encoding stores all such symbols in the 16 bit and filename length is not reduced in such case.
So, if you created a file with name containing a lot of national symbols on NTFS and yandex-disk tries to synchronize it to other device onto EXT4 the error appears because such a filename in the bytes representation in UTF-8 encoding is exceeding the 256 bytes limit. For example: 150 Cyrillic symbols are represented by 300 bytes in UTF-8 encoding.