linuxserver / docker-calibre

GNU General Public License v3.0
339 stars 62 forks source link

Encoding issue #6

Closed gpapin closed 4 years ago

gpapin commented 4 years ago

Host OS : Ubuntu Docker compose file used to setup the environment:

version: "2"
services:
  calibre:
    image: linuxserver/calibre
    container_name: calibre
    environment:
      - PGID=100
      - PUID=1000
      - TZ=Europe/London
      #- GUAC_USER=abc #optional
      #- GUAC_PASS=900150983cd24fb0d6963f7d28e17f72 #optional
    volumes:
      - ./config:/config
      - /data/ebooks/:/data
    ports:
      - 4080:8080
      - 4081:8081
    restart: unless-stopped

  calibre-web:
    image: linuxserver/calibre-web
    container_name: calibre-web
    environment:
      - PUID=1000
      - PGID=100
      - TZ=Europe/London
      - DOCKER_MODS=linuxserver/calibre-web:calibre #*optional* & **x86-64 only**
    volumes:
      - ./calibre-web:/config
      - /data/ebooks/data:/books
    ports:
      - 8083:8083
    restart: unless-stopped

Let's say I have a file named été.pdf in data: On the host: ls -al /data returns:

-rw-rw-r-- 1 user user    0 Jul 15 20:39 été.pdf

Inside calibre container : ls -al /data returns:

-rw-rw-r-- 1 abc   1000    0 Jul 15 20:39 été.pdf

And yet in calibre when I try to import that file I get this : Screenshot 2019-07-15 20 59 31

I'm not sure where the encoding issue comes from, if guacamole or calibre itself is doing it... Any pointer would be appreciated thanks.

gpapin commented 4 years ago

Thanks, this partially solved the issue, now in the popup I can navigate but when it come to importing the file, calibre still don't understand the é and give me that error:

Screenshot 2019-08-09 09 53 37

aptalca commented 4 years ago

Can you try it with the previous file named été.pdf because those are the characters we tested with. The other file may be having different issues. It's always a good idea to keep the conditions identical when troubleshooting.

gpapin commented 4 years ago

That's a fair point. Unfortunately the issue is the same. I double checked, and from within the container I'm able to rename the file so calibre should have the proper permission to access it. Given the log, it seems that those accents aren't recognised. During your check did you go all the way to the import stage ? because listing the files was working fine. see attachment for reference.

Screenshot 2019-08-14 00 00 36 Screenshot 2019-08-13 23 51 43
aptalca commented 4 years ago

Issue confirmed. We're still looking into it. It's likely due to openbox in the image

thelamer commented 4 years ago

I get the same thing with an Xubuntu install using their distributed package.

The stuff from ubuntu Repo even with all of the QT deps etc still does the same thing.

I do not think this has anything to do with Docker.

@gpapin do you have a functional Calibre setup that does not do this ?

gpapin commented 4 years ago

I tried the native mac-os version and it's working fine with this.

stev3nw commented 4 years ago

Hi, I ran into the same problem yesterday, and found some workaround. Just remove the zenity, then everything works fine.

In the docker container: apt-get remove zenity

The été.pdf was added correctly, too.

Docker image version: v4.2.0-ls32 (latest)

Screen Shot 2019-10-24 at 10 04 14 AM

thelamer commented 4 years ago

That is so odd we specifically added it to deal with the dialogues https://github.com/linuxserver/docker-calibre/commit/8e6cc317828e48bd6ea7d422bd2cb142449cfdb3

aptalca commented 4 years ago

@gpapin please test the latest version and let us know

gpapin commented 4 years ago

I can confirm this is now working @aptalca ! Thanks to all involved