diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-11 15:27:39 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-11 15:27:39 +1100 |
commit | afa6bfcef49c7152b3292010f43075356b9c9727 (patch) | |
tree | 7ed07c98557e4a499a39743fe1bf214a7c653bb4 /src | |
parent | 6d75b43716c252f69c19afd2c6e7a9457a32a638 (diff) | |
parent | c5d0f909eb7683bb5de71994e8dc886aec667670 (diff) | |
download | trackermap-server-afa6bfcef49c7152b3292010f43075356b9c9727.tar.gz trackermap-server-afa6bfcef49c7152b3292010f43075356b9c9727.tar.bz2 trackermap-server-afa6bfcef49c7152b3292010f43075356b9c9727.zip |
Merge pull request #2775 from Abyss777/fix_2772
Fix mail template encoding
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/notification/NotificationFormatter.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/notification/NotificationFormatter.java b/src/org/traccar/notification/NotificationFormatter.java index 819c387d1..b68d53ee0 100644 --- a/src/org/traccar/notification/NotificationFormatter.java +++ b/src/org/traccar/notification/NotificationFormatter.java @@ -16,6 +16,7 @@ package org.traccar.notification; import java.io.StringWriter; +import java.nio.charset.StandardCharsets; import org.apache.velocity.Template; import org.apache.velocity.VelocityContext; @@ -49,10 +50,10 @@ public final class NotificationFormatter { Template template = null; try { - template = Context.getVelocityEngine().getTemplate(event.getType() + ".vm"); + template = Context.getVelocityEngine().getTemplate(event.getType() + ".vm", StandardCharsets.UTF_8.name()); } catch (ResourceNotFoundException error) { Log.warning(error); - template = Context.getVelocityEngine().getTemplate("unknown.vm"); + template = Context.getVelocityEngine().getTemplate("unknown.vm", StandardCharsets.UTF_8.name()); } StringWriter writer = new StringWriter(); |