Druid sql chinese

 **Druid query dimension value is Chinese type, always unable to query data, how should transcoding it?**
 ** druid version:0.10.1**

public void useractive() throws SQLException {
    System.out.println(new Timestamp(1503849600000l));
    Properties connectionProperties = new Properties();
    connectionProperties.setProperty("sqlTimeZone", ZoneId.systemDefault().getId());
    connectionProperties.setProperty("useApproximateCountDistinct", "false");
    Connection connection = DriverManager.getConnection(url, connectionProperties);
    ResultSet resultSet = connection.createStatement()
            .executeQuery(" SELECT COUNT(*) AS logins,operate FROM useroperation where operate='登录成功' group by      operate");
    ResultSetMetaData resultSetMetaData = resultSet.getMetaData();

What kind of error do you get?

I think it should work when directly embedded, although it is possible something gets garbled in transit. If embedding the characters directly doesn’t work, you could try escaping them using Unicode escapes. The string ‘登录成功’ in your example would be escape as U&’\767B\5F55\6210\529F’ (remember to include the U& part).

Thank you very much for your reply. This method is correct

在 2017年9月14日星期四 UTC+8上午2:12:07,Gian Merlino写道: