Buy commercial curl support. We
help you work out your issues, debug your libcurl applications, use the API,
port to new platforms, add new features and more. With a team lead by the
curl founder Daniel himself.
FR: curl CLI: -O/--remote-name: Decode output filename
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Samuel Henrique via curl-library <curl-library_at_lists.haxx.se>
Date: Thu, 15 Aug 2024 09:44:53 +0100
Hello Dan,
> The big problem with this is character set conversion. If the URL is in UTF-8
> and the user's filesystem is in CP1252, this will produce a garbage file name.
> Or even worse, the other way around which could result in a file that's not
> even accessible by some software. Since there's no way to tell what character
> set the URL is in, this seems impossible to do correctly. Unless you're
> suggesting just handling characters in the range 0x20-0x7e or something along
> those lines, but that could result in confused users when some files are
> converted and some are not.
Those are very good points, I would like to check how wget is doing this today
to see if their approach makes sense.
Also, I will hold off implementing this for wcurl for a bit, at least until we
understand exactly how feasible it would be to have it on curl directly (and
which behavior exactly we could have, e.g.: only decode a set of characters).
Cheers,
Date: Thu, 15 Aug 2024 09:44:53 +0100
Hello Dan,
> The big problem with this is character set conversion. If the URL is in UTF-8
> and the user's filesystem is in CP1252, this will produce a garbage file name.
> Or even worse, the other way around which could result in a file that's not
> even accessible by some software. Since there's no way to tell what character
> set the URL is in, this seems impossible to do correctly. Unless you're
> suggesting just handling characters in the range 0x20-0x7e or something along
> those lines, but that could result in confused users when some files are
> converted and some are not.
Those are very good points, I would like to check how wget is doing this today
to see if their approach makes sense.
Also, I will hold off implementing this for wcurl for a bit, at least until we
understand exactly how feasible it would be to have it on curl directly (and
which behavior exactly we could have, e.g.: only decode a set of characters).
Cheers,
-- Samuel Henrique <samueloph> -- Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2024-08-15