aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/main/java/org/apache
diff options
context:
space:
mode:
authorgndrm <andreas.gundrum11@gmail.com>2021-04-27 13:33:49 +0200
committergndrm <andreas.gundrum11@gmail.com>2021-04-27 13:33:49 +0200
commitf7cdf54e59df98514bb5d71fea0dbb42f926f0e6 (patch)
treef82281be4925c0f3333dd9ac62d827c232b12597 /velocity-engine-core/src/main/java/org/apache
parent68bcad2bdc7d2c191c8f1477087318aef4eaf1d2 (diff)
downloadapache-velocity-engine-f7cdf54e59df98514bb5d71fea0dbb42f926f0e6.tar.gz
add the ability to override defaultEncoding
Diffstat (limited to 'velocity-engine-core/src/main/java/org/apache')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
index ac62b870..3d77055d 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeInstance.java
@@ -733,6 +733,9 @@ public class RuntimeInstance implements RuntimeConstants, RuntimeServices
if( overridingProperties != null )
{
configuration.combine(overridingProperties);
+
+ /* reinitialize defaultEncoding in case it is overridden */
+ defaultEncoding = getString(INPUT_ENCODING, ENCODING_DEFAULT);
}
}