diff options
author | Abyss777 <abyss@fox5.ru> | 2017-01-10 17:16:50 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2017-01-11 09:14:49 +0500 |
commit | c5d0f909eb7683bb5de71994e8dc886aec667670 (patch) | |
tree | 8e8a6f2dd310fe784617ec24b04d6a4da3a03ce8 /src | |
parent | fec3ab90ffd6819dbad5c592f6cca8b6c16a8edc (diff) | |
download | trackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.tar.gz trackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.tar.bz2 trackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.zip |
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(); |