juanpablo-santos commented on code in PR #232:
URL: https://github.com/apache/jspwiki/pull/232#discussion_r1148020915
##########
jspwiki-util/src/main/java/org/apache/wiki/util/FileUtil.java:
##########
@@ -108,8 +108,8 @@ public static String runSimpleCommand( final String
command, final String direct
final StringBuilder result = new StringBuilder();
final Process process = Runtime.getRuntime().exec( command, null, new
File( directory ) );
- try( final BufferedReader stdout = new BufferedReader( new
InputStreamReader( process.getInputStream() ) );
- final BufferedReader stderr = new BufferedReader( new
InputStreamReader( process.getErrorStream() ) ) ) {
+ try( final BufferedReader stdout = new BufferedReader( new
InputStreamReader( process.getInputStream(), StandardCharsets.UTF_8 ) );
Review Comment:
the only method using this one is expecting it to be on ISO-8859. Perhaps
passing as an argument `engine.getContentEncoding()` and use it, ensuring it's
used throughout the entire call, would be better?
##########
jspwiki-util/src/main/java/org/apache/wiki/util/Serializer.java:
##########
@@ -89,7 +89,7 @@ public static String serializeToBase64(final Map< String,
Serializable > map ) t
// Transform to Base64-encoded String
final byte[] result = Base64.getEncoder().encode(
bytesOut.toByteArray() );
- return new String( result ) ;
+ return new String( result, StandardCharsets.UTF_8 ) ;
Review Comment:
same as above?
--
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]