-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curl respects the locale's number format setting for parsing fractional seconds, it does not enforce dot #9969
Comments
Doesn't your command line and claim contradict each other? German uses comma and not a period ? (like Swedish btw) curl uses the dot-version (it ignores the locale) fixed and on purpose so that command lines become transferable between systems. This is intentional. The documentation could probably make that clearer. |
I recognize my mistake and I was about to close this issue, but then I re-read your answer and there's also something wrong:
Consider the following command line "dialogue":
Exactly like you I had the feeling that using a dot would be the proper way to do it, but it actually is the contrary of what the title of this issue says: So instead of
it should be
This entire thing is pretty confusing to me, since I also would expect to use a dot on the command line for decimals in the parameters, but also respecting the locale isn't technically that wrong neiter. I'm managing 10+ servers which all have use Update: Sorry for being late with this reply to your answer. You submitted the PR on the docs while I was typing this answer, so I didn't see it. Apparently this now makes the docs be officially in contradiction with what |
The fact that you said the complete opposite in the title is highly confusing... |
Using 7.86.0 or 7.87.0-DEV on my Linux:
|
How do you build/get your curl? |
Plain ubuntu install? |
It's on Kubuntu 20.04 LTS and Kubuntu 22.04 LTS. It's the version from the repository, I don't know it it was pre-installed or if I manually used Opening this issue was a result of this Stack Exchange post I made: https://unix.stackexchange.com/questions/725973/curl-option-connect-timeout-expected-a-proper-numerical-parameter The versions are
and
|
I can also reproduce on ubuntu 20.04, both with the shipped version and my own build. Clearly the |
It turns out we should set it to "C" if we want to override it... |
Thank you for your work. |
Independently of what the locale says Reported-by: Daniel Faust Ref: #9969
I did this
In
bash
andzsh
:curl --connect-timeout 3.14 https://example.com
I expected the following
The following printed out to stdout:
The actual result was
curl: option --connect-timeout: expected a proper numerical parameter
curl/libcurl version
as well as
operating system
Ubuntu 22.04 LTS
Linux hostname 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
With
LC_NUMERIC="de_DE.UTF-8"
as well as
Ubuntu 20.04 LTS
Linux hostname 5.15.0-52-generic #58~20.04.1-Ubuntu SMP Thu Oct 13 13:09:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
With
LC_NUMERIC="de_DE.UTF-8"
workaround
Add
export LC_NUMERIC="en_US.UTF-8"
to environments requiring fractional seconds in the timeouts.The text was updated successfully, but these errors were encountered: