spullara / spullara/mustache.java

Hard coded encoding for all input

Open
#138 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
2k
Forks
281
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the core Reader and Writer creation paths and compare them with the MustacheResolver subclass described in the issue; the payload does not name specific files or tests. Confirm where the system encoding or UTF-8 is selected, then define the requested configurable encoding behavior and verify it with the existing test code.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.