aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EnforaProtocolEncoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/EnforaProtocolEncoder.java')
-rw-r--r--src/org/traccar/protocol/EnforaProtocolEncoder.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/EnforaProtocolEncoder.java b/src/org/traccar/protocol/EnforaProtocolEncoder.java
index e7da87388..3dca1b9b3 100644
--- a/src/org/traccar/protocol/EnforaProtocolEncoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolEncoder.java
@@ -30,13 +30,11 @@ public class EnforaProtocolEncoder extends StringProtocolEncoder {
ChannelBuffer buf = ChannelBuffers.dynamicBuffer();
- byte[] contentBytes = content.getBytes();
-
- buf.writeShort(contentBytes.length + 6);
+ buf.writeShort(content.length() + 6);
buf.writeShort(0); // index
buf.writeByte(0x04); // command type
buf.writeByte(0); // optional header
- buf.writeBytes(content.getBytes(StandardCharsets.UTF_8));
+ buf.writeBytes(content.getBytes(StandardCharsets.US_ASCII));
return buf;
}