Skip to content

Media files now shown on smb mount when unicode symbol in filename

I ran into an issue where I could only see few of the files I have in a media folder on an SMB server when using the Android app (v3.5.3)

I did some digging into this issue and I believe I found the cause, so hopefully this will help in solving the issue:

Let's say that I have 5 files on the mount:

  • Vacation video 1 - Fun.mp4
  • Vacation video 2 - More fun ️.mp4
  • Vacation video 3 - 😱😱😱.mp4
  • Vacation video 4 - Sailing.mp4
  • Vacation video 5 - Beach.mp4

In the app I only see two files:

  • Vacation video 4 - Sailing.mp4
  • Vacation video 2 - More fun ️.mp4

Steps taken to analyze

I downloaded libsmb2 v4.0.0 and built the example app smb2-ls-sync and used it to access the server. It shows all the files but in the following order:

  • Vacation video 5 - Beach.mp4
  • Vacation video 1 - Fun.mp4
  • Vacation video 3 - 😱😱😱.mp4
  • Vacation video 4 - Sailing.mp4
  • Vacation video 2 - More fun ️.mp4

It seems that VLC does not like the "😱😱😱" in the filename and fails to display it and the preceding files (in the order libsmb2 returns them). Note that the video 2 also has an unicode symbol in the name and it is working fine.

I verified that this is the cause by moving video 3 out from the folder and VLC is able to show all files other files now.