vert-x3 / vertx-tcp-eventbus-bridge

Apache License 2.0
49 stars 44 forks source link

FrameHelper uses default encoding of JVM instead of UTF-8 #21

Closed smerschjohann closed 7 years ago

smerschjohann commented 7 years ago

Version

Context

While implementing a Python Eventbus, I encountered that the message is encoded based on the file.encoding of the JVM instead of the wanted UTF-8.

I traced this down to the file FrameHelper.java which encodes the JSON document into a String on which getBytes() is called. Instead of this generic call, it should be exchanged by a getBytes("UTF-8") or similiar.

This problem mainly occures on windows as the default JVM environment is not set to UTF-8 by default.

Steps to reproduce

  1. run JVM with -Dfile.encoding="iso-8859-15"
  2. send data through message bus
  3. check data transmitted on client side

Extra