1

I have a directory of video files I was moving to my tablet. The filenames are in Japanese, which is not displaying correctly on my laptop (Slackware linux, using xfce). No big deal, I don't need to see correct filenames anyway so it's not a problem for me.

Anyway, I plugged in my tablet and opened the file manager and transferred the files. I was surprised to see that with the two directories side by side (the tablet directory I copied to, and the local files on my laptop), the filenames display correctly on the directory mounted from the tablet. I did nothing at all here besides drag and drop the directory to the tablet.

Why would this be? I didn't think this was something that could even possibly happen. Being an Android tablet it's using MTP rather than mounting like an ordinary removable disk, that's the only thing I can think of that could have any bearing on this but even that seems unlikely to me.

I took a screenshot of the two file manager windows sitting side by side. The left is the tablet, the right is local. If it matters, the local disk uses ext4.

screenshot

Kefka
  • 477
  • See this for more information: https://unix.stackexchange.com/q/2089/140503. Your file browser, when talking to MTP may assume some correct encoding while it plays dumb on the local file system and needs help to guess which encoding to use. Which file browser are you using? – Harald Jan 01 '18 at 16:50
  • Using Thunar in this case, but the filenames also display incorrectly in Dolphin and Konqueror. – Kefka Jan 01 '18 at 16:52
  • What about the following in the shell LANG=C /bin/ls -l, does it show question marks? And what does env|grep LANG produce`? – Harald Jan 01 '18 at 16:57
  • in the shell, ls -l (without the LANG set) produces a bunch of garbled numbers and symbols on the filename. Doing LANG=C /bin/ls -l returns ???????????????? instead. env |grep LANG returns en_US. – Kefka Jan 01 '18 at 17:01
  • Sorry, have to get out. It is seems to be a problem of thunar not assuming the correct encoding of file names. As mentioned in the link above, the file system has no idea about encodings normally, it just has bytes and it is up to the applications to translate these into characters. You may have luck with running LANG=en_US.UTF-8 thunar . in a terminal. If this works, it is a matter of getting the LANG setting globally, not just for a single command. – Harald Jan 01 '18 at 17:07
  • no good either. Thanks for your help anyway, it isn't really important to fix regardless. I was more curious just about why it was showing correctly in one place but not the other, which you clarified for me. Thanks – Kefka Jan 01 '18 at 17:09

0 Answers0