You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/03/22 19:47:55 UTC

[GitHub] [netbeans] matthiasblaesing opened a new pull request #3836: Fix console encoding on JDK 18 (Maven + general execution)

matthiasblaesing opened a new pull request #3836:
URL: https://github.com/apache/netbeans/pull/3836


   With JDK 18 the default charset for java was changed. Before this
   change, the default charset (exposed as the system property
   file.encoding) was platform specific. After the change the default
   charset was unified to UTF-8 on all platforms.
   
   Code that interacts with native APIs can use the system property
   native.encoding to query the platform encoding and use that. And related
   to this the same is true for applications interacting with the system
   console.
   
   The primarly affected platform is windows, as both mac OS and Linux
   already default to UTF-8 as file encoding.
   
   In this PR two areas are covered:
   
   - General execution (using "External Execution API"): The module already
     allows users to specify the encoding to use. It used the default
     enconding as a fallback, if none was specified. This fallback was
     enhanced to query the native.encoding system property first. If it is
     present, it will be used as default encoding (JDK 18+), if it is
     missing, the original behavior using the default file encoding is
     activated.
   
   - Maven target execution: maven target execution is basicly an external
     execution, so the same considerations apply. In contrast to the
     general execution API, the encoding for maven execution can't be
     overriden, so both code path (input + output) are configured to use
     the native.enconfig property if present or fallback to the default
     file encoding.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing commented on pull request #3836: Fix console encoding on JDK 18 (Maven + general execution)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing commented on pull request #3836:
URL: https://github.com/apache/netbeans/pull/3836#issuecomment-1075584342


   This fixes encoding problems for maven execution introduced by JEP 400. The aim is not to reply on COMPAT encoding proposed by #3265.
   
   This does not yet fix ant execution. That will need to be a followup.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing edited a comment on pull request #3836: Fix console encoding on JDK 18 (Maven + general execution)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing edited a comment on pull request #3836:
URL: https://github.com/apache/netbeans/pull/3836#issuecomment-1075584342


   This fixes encoding problems for maven execution introduced by JEP 400. The aim is not to reply on COMPAT encoding proposed by #3265.
   
   This does not yet fix ant execution. That will need to be a followup.
   
   @mbien could you please have a look at this?


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] matthiasblaesing merged pull request #3836: Fix console encoding on JDK 18 (Maven + general execution)

Posted by GitBox <gi...@apache.org>.
matthiasblaesing merged pull request #3836:
URL: https://github.com/apache/netbeans/pull/3836


   


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on pull request #3836: Fix console encoding on JDK 18 (Maven + general execution)

Posted by GitBox <gi...@apache.org>.
mbien commented on pull request #3836:
URL: https://github.com/apache/netbeans/pull/3836#issuecomment-1075618316


   @matthiasblaesing I like the change, good job.
   
   My main concern was that there might be something we overlook, since NB is a big codebase. We should ask windows users to test on JDK 18 once there is a RC to get more coverage.
   
   Do you think we could simulate the JDK 18 behavior on JDK 11 by setting `native.encoding` to system native and `file.encoding` to UTF-8 and run a CI job on windows?
   
   One cosmetic nitpick would be that this is duplicated code, but unless more places show up where we need it its probably ok to leave it like this. Potentially add a comment to inform that the code needs to be updated in two places if there are any changes.
   
   I am going to close #3265 and disconnect tit from the issue.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists