From f313718772b72a3ff72a37de3b26b80194432b9e Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 20 Nov 2018 17:33:34 +1300 Subject: Use different charset for string encoder --- src/org/traccar/protocol/Xrb28Protocol.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/org/traccar') diff --git a/src/org/traccar/protocol/Xrb28Protocol.java b/src/org/traccar/protocol/Xrb28Protocol.java index d0a0b1390..b1f1c34fb 100644 --- a/src/org/traccar/protocol/Xrb28Protocol.java +++ b/src/org/traccar/protocol/Xrb28Protocol.java @@ -23,6 +23,8 @@ import org.traccar.PipelineBuilder; import org.traccar.TrackerServer; import org.traccar.model.Command; +import java.nio.charset.StandardCharsets; + public class Xrb28Protocol extends BaseProtocol { public Xrb28Protocol() { @@ -36,7 +38,7 @@ public class Xrb28Protocol extends BaseProtocol { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { pipeline.addLast(new LineBasedFrameDecoder(1024)); - pipeline.addLast(new StringEncoder()); + pipeline.addLast(new StringEncoder(StandardCharsets.ISO_8859_1)); pipeline.addLast(new StringDecoder()); pipeline.addLast(new Xrb28ProtocolEncoder()); pipeline.addLast(new Xrb28ProtocolDecoder(Xrb28Protocol.this)); -- cgit v1.2.3