#3440: charset should be ignored for application/x-bittorrent
----------------------+--------------------
Reporter: megaksa | Owner:
Type: bug | Status: new
Priority: major | Milestone: 2.0.4
Component: Core | Version: master
Resolution: | Keywords:
----------------------+--------------------
Comment (by megaksa):
Correct. Example of torrent download headers:
{{{
Content-Type: application/x-bittorrent; charset=Windows-1251
Content-Disposition: attachment;
filename="[rutracker.org].t5778456.torrent";
filename*=UTF-8''%D0%91%D0%B8%D0%B1%D0%BB%D0%B8%D0%BE%D1%82%D0%B5%D0%BA%D0%B0%20%D0%9C%D1%83%D1%80%D0%B7%D0%B8%D0%BB%D0%BA%D0%B8%20-%20%D0%92%D0%B0%D1%80%D0%BC%D1%83%D0%B6%20%D0%92.%20-%20%D0%9C%D0%BE%D1%81%D1%82%D0%BE%D1%80%D0%B3%20%5B1930%2C%20PDF%2C%20RUS%5D%20%5Brutracker-5778456%5D.torrent
}}}
AFAIR charset treatment is generally defined for textual MIME types (RFC
6657), i.e. for those with the text/* MIME type. For the rest, the
treatment is per specific type documentation. For the binary types it may
indicate e.g. an internal encoding (like tags encoding inside an internal
binary file representation, particularly inside a torrent file, maybe
inside an mp3 file). So generally binary files cannot be re-encoded as
textual files can be. I think the right way is to not do the above
encoding unless the file is textual. So your proposed solution is less
correct, but would also work in my particular case. I'd go with reverse.
What are the known types besides text/* where you are interested with
content re-encoding?
--
Ticket URL: <https://dev.deluge-torrent.org/ticket/3440#comment:3>
Deluge <https://deluge-torrent.org/>
Deluge Project
--
You received this message because you are subscribed to the Google Groups
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/deluge-dev/061.e2b17bab0b92a6a2cb7575f966f59684%40deluge-torrent.org.