DEV Community

Kir Axanov
Kir Axanov

Posted on

Pain & suffering. Filenames on PocketBook

Hi!

I have a wonderful PocketBook ebook reader. But every filename with non-ASCII characters turns into gibberish if it was copied from pc (via USB). As a workaround I was copying a zip archive for then to unarchive it and all filenames were OK.

Only after some embarrassing number of evenings lately (playing with rsync, cp, convmv and ALL AVAILABLE encodings) I've figured out the reason...
I was mounting the ebook with iocharset=iso-8859-1 by default, but on the ebook itself its partitions were mounted with iocharset=utf8 (with codepage=437 in both cases, btw). Bingo!

How to mount with needed iocharset (utf8 here):

# Like so: sudo mount /dev/sdc /mnt --options iocharset=utf8
sudo mount /path/to/device /path/to/mountpoint --options iocharset=utf8
Enter fullscreen mode Exit fullscreen mode

If just mounting with iocharset=utf8 does not help and you want to actually find out the mount options you'll need a console for your ebook like PBterm or Konsole from vlasovsoft apps bundle (docs, downloads).

You can check current mount options with just mount command (search for your device and look at options in parenthesis). That's how I learned about wrong iocharset in the first place.

Bye!

Top comments (0)