Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
5.14.4
-
None
-
None
-
system where encoding not set to UTF-8 by default
-
Patch Available
Description
in StompConnection.java
public void send(String destination, String message, String transaction, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (transaction != null) { headers.put("transaction", transaction); } StompFrame frame = new StompFrame("SEND", headers, message.getBytes()); sendFrame(frame.format()); }
should be
public void send(String destination, String message, String transaction, HashMap<String, String> headers) throws Exception { if (headers == null) { headers = new HashMap<String, String>(); } headers.put("destination", destination); if (transaction != null) { headers.put("transaction", transaction); } StompFrame frame = new StompFrame("SEND", headers, message.getBytes("UTF-8")); sendFrame(frame.format()); }
or, at least if you use default encoding for converting here, you should use default encoding in StompFrame.format()