DEV Community

Discussion on: Please stop hack "chcp 65001"

Collapse
 
richturn_ms profile image
Rich Turner

Hi. Thanks for reaching out on Twitter.

I think what you're seeing here is similar to my slightly naïve approach to supporting UTF-8 in a PR I submitted to the Curl tool to enable VT processing on Windows: github.com/curl/curl/pull/3011/fil...

Specifically, in line #265 of src/tool_main.c, you'll see I force the Console to the UTF-8 codepage.

This was far from the best way to do this can be seen in the commit mattn submitted: github.com/curl/curl/commit/5bfaa8...

Mattn's PR above fixes the behavior clearly articulated in issue 3211 here: github.com/curl/curl/issues/3211 which looks very similar the issue you're seeing.

HTH.