[ http://issues.apache.org/jira/browse/VELOCITY-259?page=all ] Will Glass-Husain resolved VELOCITY-259: ----------------------------------------
Fix Version: 1.5 Resolution: Fixed Assign To: (was: Velocity-Dev List) Added comment as suggested to Velocity and VelocityEngine. > Can't see a reason why Velocity.mergeTemplate(String,Context,Writer) is > deprecated > ---------------------------------------------------------------------------------- > > Key: VELOCITY-259 > URL: http://issues.apache.org/jira/browse/VELOCITY-259 > Project: Velocity > Type: Improvement > Components: Documentation > Versions: 1.3.1 > Environment: Operating System: other > Platform: Other > Reporter: Gernot Hüller > Priority: Minor > Fix For: 1.5 > > The encoding of template files is well-defined, so I see no reason to > deprecate > the method from above. > There is a velocity property input.encoding which defines the encoding > of templates > "Character encoding for input (templates). Using this, you can use > alternative > encoding for your templates, such as UTF-8." > I feel that Velocity.mergeTemplate(String,Context,Writer) should simply use > that encoding. > By deprecating the method and referencing to mergeTemplate > (String,String,Context,Writer) you force a developer to duplicate the > property. > Suggestion: > IF you decide to keep it deprecated, please extend the javadoc of the long > mergeTemplate method eg: > " > The default encoding that Velocity uses to read template files is defined in > the property input.encoding and defaults to ISO-8859-1. > You can get the encoding that is currently configured in the Velocity runtime > using > "RuntimeSingleton.getString > (RuntimeConstants.INPUT_ENCODING,RuntimeConstants.ENCODING_DEFAULT)" > And you can paste that code for the second parameter of mergeTemplate. > " -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]