Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard coded encoding for all input #138

Open
DALDEI opened this issue Apr 6, 2015 · 1 comment
Open

Hard coded encoding for all input #138

DALDEI opened this issue Apr 6, 2015 · 1 comment

Comments

@DALDEI
Copy link

DALDEI commented Apr 6, 2015

I have created the beginnings of a 'cli' and api based on mustache.java
https://github.com/DALDEI/mustache-cli

This is primarily intended to integrate the API portion into xmlsh as an extension module
https://github.com/DALDEI/xmlsh

The first need I have is to use native Jackon Node objects as data, and use mustache template files that produce text serialized JSON.

There are multiple issues I am working through - one I ran into is a hard coded encoding for creating Readers and Writers. The readers use either the system encoding or UTF-8, and I havent found OutputStreamWriters that are not in test code.

To solve the input side I have had to subclass MustacheResolver to override the default encodings.
( xmlsh allows runtime settings for all encodings input and out ).
Do you think it is reasonable to provide for a setter for the encoding used for creating Writers in the core code so one need not subclass just for this ?
I can make a proposal change and submit a pull request.

@spullara
Copy link
Owner

It seems reasonable to me to set the input/output encoding on the DefaultMustacheFactory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants