Terminal: Win32 curl.exe should enable VT processing

Created on 4 Jul 2018  路  6Comments  路  Source: microsoft/terminal

I believe curl.exe is owned by PowerShell team, but since the issue is conhost-related, and you guys are probably the ones who can best understand what the issue is, and know how to fix it quickly, I'll report this here hoping you can get it done.

curl for Windows 10 (%SystemRoot%\System32curl.exe) works pretty well, but inherits the conhost mode of the parent process.
Because of this, VT markup served over http for console users renders the escape characters instead of processing them as control sequences.

For behavior parity with the original version, can someone please add a SetConsoleMode ENABLE_VIRTUAL_TERMINAL_PROCESSING to curl.exe ?

curl wsl
curl win32

Area-VT Issue-Question Product-Conhost Product-Terminal Resolution-Answered

Most helpful comment

Update: The core of the changes is working nicely. A few more changes required to make curl handle codepages better on Windows, but we're making progress:

image

All 6 comments

Actually, I think that technically the WSL team owns the curl.exe we ship inbox now...

Regardless, we've had discussion before about going and updating curl with changes to enable VT processing for windows. @bitcrazed who should be on top of following up with them. IIRC someone needs to make a PR to the master curl repo (I don't believe we're maintaining a separate fork), and we'll take a binary drop from that, but I don't really remember the details.

Also see #51

I actually have a change-set to enable VT mode in Curl and will be working with the team to incorporate it if they're willing to accept my PR.

Hopefully, this will remedy this problem.

Update: The core of the changes is working nicely. A few more changes required to make curl handle codepages better on Windows, but we're making progress:

image

This was curl/curl#3011, which is now merged. Thanks!

Reopening since we haven't yet pulled & rebuilt curl from recent sources.

Also started thread with team to consider taking this on.

Looks like it does this now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TayYuanGeng picture TayYuanGeng  路  3Comments

mrmlnc picture mrmlnc  路  3Comments

mdtauk picture mdtauk  路  3Comments

DieselMeister picture DieselMeister  路  3Comments

ghost picture ghost  路  3Comments