aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'velocity-engine-core/src')
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java3
-rw-r--r--velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java11
-rw-r--r--velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties13
3 files changed, 13 insertions, 14 deletions
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
index 87a2d582..1ee36f0c 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/DeprecatedRuntimeConstants.java
@@ -123,6 +123,9 @@ public interface DeprecatedRuntimeConstants
*/
String OLD_RESOURCE_LOADER_CHECK_INTERVAL = "modificationCheckInterval";
+ /** The default character encoding for the templates. Used by the parser in processing the input streams. */
+ String OLD_INPUT_ENCODING = "input.encoding";
+
/**
* The <code>eventhandler.referenceinsertion.class</code> property specifies a list of the
* {@link org.apache.velocity.app.event.ReferenceInsertionEventHandler} implementations to use.
diff --git a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
index 274d5158..28e96ac1 100644
--- a/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
+++ b/velocity-engine-core/src/main/java/org/apache/velocity/runtime/RuntimeConstants.java
@@ -211,6 +211,11 @@ public interface RuntimeConstants extends DeprecatedRuntimeConstants
*/
String RESOURCE_LOADER_CHECK_INTERVAL = "modification_check_interval";
+ /** The default character encoding for the templates. Used by the parser in processing the input streams. */
+ String INPUT_ENCODING = "resource.default_encoding";
+
+ /** Default Encoding is UTF-8. */
+ String ENCODING_DEFAULT = "UTF-8";
/*
* ----------------------------------------------------------------------
@@ -335,12 +340,6 @@ public interface RuntimeConstants extends DeprecatedRuntimeConstants
/** Switch for the interpolation facility for string literals. */
String INTERPOLATE_STRINGLITERALS = "runtime.interpolate_string_literals";
- /** The character encoding for the templates. Used by the parser in processing the input streams. */
- String INPUT_ENCODING = "input.encoding";
-
- /** Default Encoding is UTF-8. */
- String ENCODING_DEFAULT = "UTF-8";
-
/** Switch for ignoring nulls in math equations vs throwing exceptions. */
String STRICT_MATH = "runtime.strict_math";
diff --git a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
index 13cb52ef..14f85e4f 100644
--- a/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
+++ b/velocity-engine-core/src/main/resources/org/apache/velocity/runtime/defaults/velocity.properties
@@ -22,12 +22,6 @@
runtime.log.log_invalid_references = true
# ----------------------------------------------------------------------------
-# T E M P L A T E E N C O D I N G
-# ----------------------------------------------------------------------------
-
-input.encoding=UTF-8
-
-# ----------------------------------------------------------------------------
# Strings interning
# ----------------------------------------------------------------------------
# Set to true to optimize memory, to false to optimize speed
@@ -59,8 +53,9 @@ directive.if.empty_check = true
# is governed.
# ----------------------------------------------------------------------------
-directive.include.output_errormsg_start = <!-- include error :
-directive.include.output_errormsg_end = see error log -->
+# deprecated: if/how errors are displayed is not the concern of the engine, which should throw in all cases
+#directive.include.output_errormsg_start = <!-- include error :
+#directive.include.output_errormsg_end = see error log -->
# ----------------------------------------------------------------------------
# P A R S E P R O P E R T I E S
@@ -91,6 +86,8 @@ context.scope_control.foreach = true
#
# ----------------------------------------------------------------------------
+resource.default_encoding=UTF-8
+
resource.loaders = file
resource.loader.file.description = Velocity File Resource Loader