Skip to content

Commit 5c2e858

Browse files
committed
curl: re-enable UNICODE by default
The article https://blog.orange.tw/posts/2025-01-worstfit-unveiling-hidden-transformers-in-windows-ansi/ may tip the balance towards UNICODE enabled being the less bad solution. It mitigates Windows's own shortcomings in translating between Unicode and 8-bit codepages (aptly coined "WorstFit"). It may also be a way to receive more feedback on curl UNICODE mode issues, also possibly giving a new momentum to address them. Original reasons for disabling, written in bb02905 still apply today. Also add a `nounicode` config option to build without UNICODE. Follow-up to bb02905
1 parent 7dc570e commit 5c2e858

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,34 @@ Uses [LibreSSL](https://www.libressl.org/) TLS backend.
6767
```
6868
Windows:
6969
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
70-
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI SSLS-EXPORT threadsafe UnixSockets zstd
70+
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI SSLS-EXPORT threadsafe Unicode UnixSockets zstd
7171
7272
macOS:
7373
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
74-
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Largefile libz NTLM PSL SSL SSLS-EXPORT threadsafe UnixSockets zstd
74+
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Largefile libz NTLM PSL SSL SSLS-EXPORT threadsafe UnixSockets zstd
7575
7676
Linux:
7777
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
78-
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IPv6 Largefile libz NTLM PSL SSL SSLS-EXPORT threadsafe UnixSockets zstd
78+
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IPv6 Largefile libz NTLM PSL SSL SSLS-EXPORT threadsafe UnixSockets zstd
7979
```
8080
<details><summary>Alternate configurations:</summary><p>
8181

8282
```
8383
"nocares", HTTP/2:
8484
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
85-
Features: alt-svc asyn-rr AsynchDNS brotli CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI SSLS-EXPORT threadsafe UnixSockets zstd
85+
Features: alt-svc AsynchDNS brotli CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI SSLS-EXPORT threadsafe UnixSockets zstd
8686
8787
"mini", without brotli and zstd, with OS TLS backend (Schannel, SecureTransport) if available:
8888
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp ws wss
89-
Features: alt-svc AsynchDNS CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
89+
Features: alt-svc AsynchDNS CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
9090
9191
"micro", without libssh2:
9292
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
93-
Features: alt-svc AsynchDNS CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
93+
Features: alt-svc AsynchDNS CAcert HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
9494
9595
"nano", HTTP/1.1:
9696
Protocols: dict file ftp ftps gopher gophers http https imap imaps ipfs ipns ldap ldaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
97-
Features: AsynchDNS CAcert HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
97+
Features: AsynchDNS CAcert HSTS HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSPI threadsafe UnixSockets
9898
9999
"pico", HTTP/1.1-only:
100100
Protocols: http https

_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ set -o xtrace -o errexit -o nounset; [ -n "${BASH:-}${ZSH_NAME:-}" ] && set -o p
7070
# curldocs include curl Markdown manual pages in the package
7171
# msvcrt build against msvcrt instead of UCRT (for win target)
7272
# gcc build with GCC (including Apple clang aliased to gcc) (defaults to llvm, and "gcc" (= Apple clang) for mac target)
73-
# unicode build curl in UNICODE mode (for win target) [EXPERIMENTAL]
73+
# nounicode build curl without [EXPERIMENTAL] UNICODE mode (for win target)
7474
# osnoidn build curl without OS-supplied IDN support
7575
# werror turn compiler warnings into errors
7676
# debug debug build

curl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ _VER="$1"
4343
# [ "${_CC}" = 'gcc' ] && LDFLAGS+=' -Wl,--trace'
4444
fi
4545

46-
if [ "${_OS}" = 'win' ] && [[ "${_CONFIG}" = *'unicode'* ]]; then
46+
if [ "${_OS}" = 'win' ] && [[ "${_CONFIG}" != *'nounicode'* ]]; then
4747
options+=' -DENABLE_UNICODE=ON'
4848
fi
4949

0 commit comments

Comments
 (0)