Skip to content

invalid byte sequence in UTF-8 on Linux #152

Description

@loveencounterflow

I installed image_optim on my Raspberry and find that I can't use image_optim because of an encoding error that sadly comes without any stacktrace. I remembered that Ruby had some encoding issues in older versions (?1.9?), so I made sure that I have ruby2.2 installed; I removed the existing image_optim and re-installed with sudo gem2.2 install image_optim_pack image_optim. But the error still persists:

flow@raspi:/tmp/kb-test$ image_optim dont-touch-me.jpg 
invalid byte sequence in UTF-8

That's all I get as output, except there's now a mysteriously-named file in the directory:

flow@raspi:/tmp/kb-test$ ls -AlF
total 188
-rw-rw-r-- 1 flow flow     0 Jul 25 15:32 ??5@@???@8
...

The questionmarks are really replacement characters; using my Linux Mint file browser over sshfs I can see that the first byte is 0x01, and the one right before the second @ is 0x04.

The weird thing is that I can install and run image_optim on my Linux Mint box without errors, so the error should be caused by a difference between the two systems, not image_optim per se.

Here's what uname -a gives me:

Linux raspi 4.1.15-v7+ #830 SMP Tue Dec 15 17:02:45 GMT 2015 armv7l armv7l armv7l GNU/Linux

How can I proceed from here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions