title: Logstash JDBC adapter: Varbinary to UTF-8? (mysql to elastic import)
body: <p>I'm trying to import a mysql table into elasticsearch via logstash. One column is of the type "varbinary" which causes the following error:</p>
  
  <pre><code>[2018-10-10T12:35:54,922][ERROR][logstash.outputs.elasticsearch] An unknown error occurred sending a bulk request to Elasticsearch. We will retry indefinitely {:error_message=&gt;"\"\\xC3\" from ASCII-8BIT to UTF-8", :error_class=&gt;"LogStash::Json::GeneratorError", :backtrace=&gt;["/usr/share/logstash/logstash-core/lib/logstash/json.rb:27:in `jruby_dump'", "/usr/share/logstash/vendor/$
  </code></pre>
  
  <p>My logstash config:</p>
  
  <pre><code>input {
    jdbc { 
      jdbc_connection_string =&gt; "jdbc:mysql://localhost:3306/xyz"
      # The user we wish to execute our statement as
      jdbc_user =&gt; "test"
      jdbc_password =&gt; "test"
      # The path to our downloaded jdbc driver
      jdbc_driver_library =&gt; "/mysql-connector-java-5.1.47/mysql-connector-java-5.1.47.jar"
      jdbc_driver_class =&gt; "com.mysql.jdbc.Driver"
      # our query
      statement =&gt; "SELECT * FROM x"
      }
    }
  output {
    stdout { codec =&gt; json_lines }
    elasticsearch {
    "hosts" =&gt; "localhost:9200"
    "index" =&gt; "x"
    "document_type" =&gt; "data"
    }
  }
  </code></pre>
  
  <p>How can I convert the varbinary to uft-8? Do I have to use a special filter?</p>