fixed encoding used when reading HelpMojo Velocity template
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1405266 13f79535-47bb-0310-9956-ffa450edef68master
parent
2077b3e8cf
commit
4a1d287e0f
|
|
@ -50,6 +50,7 @@ import java.io.InputStreamReader;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
|
|
@ -195,9 +196,13 @@ public class PluginHelpGenerator
|
||||||
InputStreamReader isReader = null;
|
InputStreamReader isReader = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
isReader = new InputStreamReader( is ); // FIXME platform encoding
|
isReader = new InputStreamReader( is, "UTF-8" ); // plugin-tools sources are UTF-8 (and even ASCII in this case)
|
||||||
velocityComponent.getEngine().evaluate( context, stringWriter, "", isReader );
|
velocityComponent.getEngine().evaluate( context, stringWriter, "", isReader );
|
||||||
}
|
}
|
||||||
|
catch ( UnsupportedEncodingException e )
|
||||||
|
{
|
||||||
|
// not supposed to happen since UTF-8 is supposed to be supported by any JVM
|
||||||
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
IOUtil.close( is );
|
IOUtil.close( is );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue