Hi.
On 09/12/2016 15:34, Michael Osipov wrote:
Hi folks,
the default encoding has been changed recently to UTF-8 [1], though I
still think that it requires some more description from a user's point
of view and more code cleanup
Feel free to help!
* All templates (!) (anything else?) from ImputStream are read with
that new input encoding, unless other stated
That's all, except a resource can also be a static text file, as in
#include('file').
* Isn't output.econding obsolete? All merge methods require a Writer
anyway.
I removed it at first, and then put it back in because it is used by the
view tools, to set the HTTP response content type charset (as in:
"text/html; charset=UTF-8"). J2EE doc states that this charset will be
used when created the response writer. I know it's a bit of a pity to
have it defined in the engine while it is used in the view tools, but:
- it is how it was done before
- it makes some sense to have it defined here, symmetrically to
input.encoding, even if it's not used directly by the engine
- it's still useful to distinguish input and output encodings, it let
someone serve UTF-8 files from ISO-8859-1 templates, for instance
Why the (!) ?
* UTF-8 is defined several times in RuntimeConstants and
StringResource*. Is that intended?
Nope. I fix that.
Claude
[1]
http://velocity.apache.org/engine/2.0/upgrading.html#dependencies-changes
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org