0

After mergeTemplateIntoString, the spanish simbols like Ñ and ñ falls.

public String loadData (VelocityEngine velocityEngine, Map mParam) {

        String result;

        try {

            result = VelocityEngineUtils.mergeTemplateIntoString(velocityEngine, "informesHtml/template.vm",
                mParam);

            return result;

        } catch (VelocityException e) {
            e.printStackTrace();
            return "";
        }
    }

The .vm template use UTF-8 and the DB WE8ISO8859P15. I've tried to change a velocityEngine format, but without success. The spring framework version is 4.3.9.

  • Did you check this link:https://stackoverflow.com/questions/30897865/how-do-i-get-spanish-characters-to-display-properly-using-a-velocity-template – soorapadman Feb 04 '19 at 06:21

1 Answers1

0

I just set text/html;charset=ISO-8859-1 in the .html file and now everything works fine.