Code Monkey home page Code Monkey logo

Comments (3)

shartte avatar shartte commented on June 28, 2024

I decided to do a little repro for the general issue of UTF-8 console output in Gradle:
https://github.com/shartte/gradle-utf-8-repro

The expected output can be seen in the Github Action output of that repo:
image

The same script, run under a Windows command prompt with default settings (conhost.exe):
image

Windows Terminal using default settings:
image

WSL-2 in Windows-Terminal:
image

Git Bash:
image

from gradle.

ljacomet avatar ljacomet commented on June 28, 2024

This feature request is in the backlog of the relevant team and is prioritized by them.


Thanks for taking the time to craft a reproducer and show different outputs with different setups.

Relates to:

from gradle.

shartte avatar shartte commented on June 28, 2024

I should also note that there is another way that would completely circumvent probably both the stdout encoding and windows console codepage issue:

In the Gradle "client" process that receives text output from the Daemon in Java-String-Form (so UTF-16 internally), you could use a native Windows API to write UTF-16 to the console directly, rather than via stdout. (https://learn.microsoft.com/en-us/windows/console/writeconsole)
Interestingly enough, the gradle-natives already do the inverse of using Windows API to read from the console :-)
(https://github.com/gradle/native-platform/blob/master/native-platform/src/main/cpp/win.cpp#L671)

from gradle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.