qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
27.69k stars 3.92k forks source link

[v3.3.1] Non-standardised unicode file/folder names are failing force rechecks. #4479

Closed ghost closed 2 years ago

ghost commented 8 years ago

Info

qBittorrent: 3.3.1 Libtorrent: 1.0.7.0 Boost: 1.60.0

OS: Manjaro (Arch) Linux Locale: en_AU.UTF-8 File system: NTFS (accessed through ntfs-3g)

See title. This bug is causing two files or folders to have the exact same name but different encoding. Note that it seems to only occur for accented characters. This happened out of nowhere after I rebooted my OS.

Below is an example to clarify what I mean:

Image of Bug

File name as displayed in both qBittorrent and my file manager for both entities: 06 - Manoo & François A - The Deep.flac

File names for these file entities as displayed by Python 2 ( python -c 'import os;print os.listdir(".")' ): '06 - Manoo & Franc\xcc\xa7ois A - The Deep.flac', '06 - Manoo & Fran\xc3\xa7ois A - The Deep.flac'

The former is the new entity that qBittorrent has created, whereas the latter is the old, valid entity which should be detected by qBittorrent and succeed in the Force Recheck.

EDIT: From the IRC channel, this may be of interest: http://blogs.skicelab.com/maurizio/unicode-common-pitfalls.html

"A character in Unicode can be represented in multiple ways, for instance the character é in UTF-8 is represented by both the byte strings '\xc3\xa9' and 'e\xcc\x81'. This means you might find out you have the same text represented in two different ways".

Chocobo1 commented 8 years ago

Still, I don't understand which part qBT is doing wrong, or what you're trying to achieve.

Your image show 2 same-name files (different unicode encoding?) which also has 2 different file size !? I'm not sure how to interpret this information.

Any test case/steps we could try it out?

ghost commented 8 years ago

As stated above, the problem arose out of nowhere. Suddenly qBittorrent/libtorrent no longer detected files which should be 100% complete/seeding for no apparent reason.

The different file sizes represent one which is complete (the bigger version), whereas the other is incomplete because it's the file that qBittorrent has created/now recognises, despite the fact that both have the same name representations yet different byte strings. From my point-of-view, the file size should be irrelevant - it is only a symptom of qBittorrent not detecting the complete file as it should.

As for test cases/steps, I can't give any as it happened out of nowhere where my system setup/qBittorrent configuration remained the same before and after this bug occured.

From a quick chat on IRC, it seems that this maybe more of a problem with the Rasterbar libtorrent backend, but I'm not at a competent programming level to find out if that's truly the case.

Chocobo1 commented 8 years ago

I understand the issue now.

However, on my btrfs disk Franc\xcc\xa7ois & Fran\xc3\xa7ois are treated as different files, still I couldn't guess where the culprit could be.

it seems that this maybe more of a problem with the Rasterbar libtorrent backend

https://github.com/arvidn/libtorrent/issues Please post a link here to the new filed issue.

attila-lendvai commented 5 years ago

+1 from me.

i've updated my debian 9 to 10, and a few, already downloaded torrents became 0%, even after a forced recheck. when i investigated, i noticed weirdness with the filenames, and it's also visible in how qbittorrent displays the file names.

as displayed by qbittorrent:

Ob_vics J. Gyula - Val_n_z_t__matematikai statisztika

as displayed by the website, and copy-pasted here from there:

Obádovics J. Gyula - Valószínűségszámítás és matematikai statisztika.pdf
ghost commented 2 years ago

Closing this as this was reported on a very old version. If you can still reproduce it with latest version please comment to re-open the thread or create a new thread.

powerarmorpatch commented 1 year ago

I still have a problem with accented letters (like á) in file names / paths, qBittorrent 4.5.0

Details: I'm runnig qBittorent 4.5.0 32-bit via docker on OMV 6 Odroid HC2 SBC with single btrfs HDD. I have no problem downloading torrent with accented letters in file / directory names - usually it completes to 100%. However if I start to recheck this torrent it fails for files with accented letters (like á, but cyrillic letters are fine). Example:

Recheck % | File / Folder
68.6%       /Nubya Garcia - SOURCE ⧺ WE MOVE (2021)/
0.0%        '01. La cumbia me está llamando (Kaidi Tatham Remix).flac'
99.1%       '02. Together Is A Beautiful Place To Be (Nala Sinephro Remix).flac'
100%        '03. The Message Continues (DJ Harrison Remix).flac'
100%        '04. Inner Game (Blvck Spvde Remix).flac'
100%        '05. Boundless Beings (Georgia Anne Muldrow Remix).flac'
100%        '06. Stand With Each Other (KeiyaA Remix).flac'
0.0%        '07. La cumbia me está llamando (Suricata Remix).flac'
99.3%       '08. Source (Dengue Dengue Dengue Remix).flac'
100%        '09. Pace (Moses Boyd Remix).flac'
100%        cover.jpg

Recheck means to verify for integrity, but qBittorent fails to find these files completely - shows 0.0%.

I did some testing with my desktop Pop-os (based upon Ubuntu) with same torrent:

  1. with desktop qBittorrent 4.5.0 64-bit installed at Pop-os, downloading and rechecking on Pop-os btrfs SSD - no problem, 100% recheck for "á" files.
  2. with desktop qBittorrent installed at Pop-os, downloading to OMV CIFS share and rechecking to - no problem, 100% recheck. CIFS share is on the same btrfs HDD on OMV SBC, mounted to desktop Pop-os.
  3. with docker qBittorrent at OMV, downloading and rechecking on btrfs HDD on OMV - 0% recheck
  4. with docker qBittorrent at OMV, downloading to btrfs HDD on OMV - copy directory from OMV CIFS share to Pop-os SSD - recheck copied directory with desktop qBittorrent 100%.
UUID=4d27c22c-348e-4d96-8d6d-0bed3cc7f965               /       ext4    noatime,nodiratime,defaults,commit=600,errors=remount-ro        0 1
tmpfs /tmp tmpfs defaults,nosuid 0 0
# >>> [openmediavault]
/dev/disk/by-uuid/ede632ae-9cfa-462c-b082-7d3c3d2e780b          /srv/dev-disk-by-uuid-ede632ae-9cfa-462c-b082-7d3c3d2e780b      btrfs   defaults,nofail 0 2
/srv/dev-disk-by-uuid-ede632ae-9cfa-462c-b082-7d3c3d2e780b/Movies/              /export/Movies  none    bind,nofail     0 0
# <<< [openmediavault]

Specs: Armbian 22.08.2 Bullseye with Linux 5.4.212-odroidxu4

NB: I do not endorse illegal torrenting in any way, files above is personal rip from cd I own.

powerarmorpatch commented 1 year ago

Closing this as this was reported on a very old version. If you can still reproduce it with latest version please comment to re-open the thread or create a new thread.

reopen please, posted my issue above

thalieht commented 1 year ago

reopen please, posted my issue above

https://github.com/qbittorrent/qBittorrent/issues/4479#issuecomment-168296920