[
https://issues.apache.org/jira/browse/EXEC-112?focusedWorklogId=394108&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-394108
]
ASF GitHub Bot logged work on EXEC-112:
---------------------------------------
Author: ASF GitHub Bot
Created on: 27/Feb/20 11:55
Start Date: 27/Feb/20 11:55
Worklog Time Spent: 10m
Work Description: jackdos commented on pull request #6: EXEC-112
URL: https://github.com/apache/commons-exec/pull/6
This PR addresses EXEC-112 by adding a "charset" variable to the
LogOutputStream class, and providing an overloaded constructor to allow a user
to set it. If this is set, when calling processBuffer, the buffer.toString
calls uses the overload with a charset name specified. Existing behaviour with
the original constructor is maintained.
The first commit adds a unit test that fails when running "mvn verify" from
the command line on Windows so that the issue can be verified, this test is
removed in a subsequent commit.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 394108)
Remaining Estimate: 23h 50m (was: 24h)
Time Spent: 10m
> Extended UTF-8 characters are not properly handled by the LogOutputStream
> -------------------------------------------------------------------------
>
> Key: EXEC-112
> URL: https://issues.apache.org/jira/browse/EXEC-112
> Project: Commons Exec
> Issue Type: Bug
> Environment: This will affect any system where the output of the tool
> is not in the default character set for the system, but has been seen on
> Windows where the tool produces UTF-8 output.
> Reporter: Jack O'Sullivan
> Priority: Minor
> Original Estimate: 24h
> Time Spent: 10m
> Remaining Estimate: 23h 50m
>
> In the processBuffer method of LogOutputStream, "buffer.toString()" is
> called, before passing the result to processLine. This relies on the default
> encoding of the system to correctly handle the output.
> On Windows, if the CL tool output contains UTF-8 characters, these are
> mishandled by the toString method of the buffer.
> Because the buffer is a private member variable, even if you extend this
> class, the only way to enforce correct character set handling is to use
> reflection to access the buffer in an over-ride of the processBuffer method.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)