aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-01-10 17:16:50 +0500
committerAbyss777 <abyss@fox5.ru>2017-01-11 09:14:49 +0500
commitc5d0f909eb7683bb5de71994e8dc886aec667670 (patch)
tree8e8a6f2dd310fe784617ec24b04d6a4da3a03ce8 /src/org/traccar
parentfec3ab90ffd6819dbad5c592f6cca8b6c16a8edc (diff)
downloadtrackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.tar.gz
trackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.tar.bz2
trackermap-server-c5d0f909eb7683bb5de71994e8dc886aec667670.zip
Fix mail template encoding
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/notification/NotificationFormatter.java5
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();