On 05/12/2016 13:11, Sergiu Dumitriu wrote:
[...]
==============================================================================
---
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
(original)
+++
velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
Fri Jul 15 08:36:09 2016
@@ -1527,7 +1527,17 @@ public class RuntimeInstance implements
{
if (encoding == null)
{
- encoding = getString(INPUT_ENCODING, ENCODING_DEFAULT);
+ /*
+ * first try to get the OS encoding
+ */
+ encoding = System.getProperty("file.encoding");
+ if (encoding == null)
I don't think this will ever happen. The JVM refuses to start if the
system encoding is not well defined.
Personally, I think that relying on the system encoding is prone to
errors, and makes an application less portable than if the application
developer specifies the encoding of the files in the binaries, and of
the expected output, especially for a web application.
+1, you're right.
Let's ignore the system value, and use UTF-8 by default.
Claude
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org