diff options
author | Claude Brisson <cbrisson@apache.org> | 2019-03-10 13:39:06 +0000 |
---|---|---|
committer | Claude Brisson <cbrisson@apache.org> | 2019-03-10 13:39:06 +0000 |
commit | 0f0fce55863b66f4861c6f305dd50d1ffc28c624 (patch) | |
tree | 46ae06c9d44792b22645c2dc29bb0e1705b1a17a /velocity-engine-core/src | |
parent | 0bf63651edf493f2e8d4cc2149391b8b4c130fc9 (diff) | |
download | apache-velocity-engine-0f0fce55863b66f4861c6f305dd50d1ffc28c624.tar.gz |
[engine][VELOCITY-909] Rename input.encoding to resource.default_encoding
git-svn-id: https://svn.apache.org/repos/asf/velocity/engine/branches/VELOCITY-909@1855152 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'velocity-engine-core/src')
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 |