Buy commercial curl support from WolfSSL. 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
himself.
Re: String encoding used by CURLOPT_ERRORBUFFER
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 14 Jan 2021 15:32:33 -0500
On 1/14/2021 1:46 PM, Andreas Falkenhahn via curl-library wrote:
> Is there any specification concerning the encoding used by the string copied to CURLOPT_ERRORBUFFER in case of an error?
>
> On my German Windows system I often seem to be getting ISO 8859-1. For example, the error message for CURLE_SSL_CONNECT_ERROR is this:
>
> "schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - Die Sperrfunktion konnte die Sperrung nicht überprüfen, da der Sperrserver offline war."
>
> Note the German umlauts "ü" in the error message.
>
> Is there any way to make curl return something more i18n-proof, e.g. UTF-8? If not, consider this a feature request;)
We left extended error messages in the received encoding intentionally.
curl errors are in English but may append a system error like whatever
strerror gives us or for some Windows errors we convert to multibyte to
be consistent and keep local encoding. [1]
[1]: https://github.com/curl/curl/blob/curl-7_74_0/lib/strerror.c#L666-L678
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-14
Date: Thu, 14 Jan 2021 15:32:33 -0500
On 1/14/2021 1:46 PM, Andreas Falkenhahn via curl-library wrote:
> Is there any specification concerning the encoding used by the string copied to CURLOPT_ERRORBUFFER in case of an error?
>
> On my German Windows system I often seem to be getting ISO 8859-1. For example, the error message for CURLE_SSL_CONNECT_ERROR is this:
>
> "schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - Die Sperrfunktion konnte die Sperrung nicht überprüfen, da der Sperrserver offline war."
>
> Note the German umlauts "ü" in the error message.
>
> Is there any way to make curl return something more i18n-proof, e.g. UTF-8? If not, consider this a feature request;)
We left extended error messages in the received encoding intentionally.
curl errors are in English but may append a system error like whatever
strerror gives us or for some Windows errors we convert to multibyte to
be consistent and keep local encoding. [1]
[1]: https://github.com/curl/curl/blob/curl-7_74_0/lib/strerror.c#L666-L678
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-01-14