netliomax25-code opened a new pull request, #2689:
URL: https://github.com/apache/groovy/pull/2689

   1. getText(Process) and TextDumper (which backs consumeProcessOutput, 
waitForProcessOutput and the new waitForResult/ProcessResult) decode the 
process output stream through new InputStreamReader(stream) with no charset, so 
they use Charset.defaultCharset().
   2. since JEP 400 that default is UTF-8 regardless of platform, while a child 
process still writes its output in the OS native encoding, so on a non-UTF-8 
host (a Windows code page, or Linux under a C/legacy locale) non-ASCII output 
no longer round-trips and is silently corrupted (a native 0xE9 byte for é 
decodes to U+FFFD).
   
   Decode with the native.encoding system property (JDK 17+, the documented way 
to obtain the OS native encoding), falling back to Charset.defaultCharset() 
when it is unavailable. UTF-8 hosts are unaffected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to