agensgraph icon indicating copy to clipboard operation
agensgraph copied to clipboard

Encoding problem with JDBC driver when using "Umlaut"

Open Michael4713 opened this issue 6 years ago • 2 comments

When querying nodes with special characters, i.e. Umlauts (e.g. name: "Réné) using the JDBC driver with the query and Java Code

match (n) return n.name
String name = result.getString(1);

returns garbage.

If the whole node is queried then in the Java code the parameter is extracted everything works fine. With the query and Java Code

match (n) return n.name
Vertex object1 = (Vertex)result.getObject(1);
String name = object1.getString("name");

JDBC Driver Configuration

Additional Paramters: unicode=true&encoding=UTF-8 Driver Class: net.bitnine.agensgraph.Driver Driver Version: 1.4.2 Client Encoding (queried via get client_encoding): UTF8 Server Encoding (queried via get server_encoding): UTF8

Michael4713 avatar Jan 31 '19 07:01 Michael4713

@Michael4713 In my case, i see Umlauts using the JDBC driver and the command line interface.

Do you see Umlauts through the AgraphGraph interactive terminal(i.e. Agens)?

bylee5 avatar Feb 01 '19 00:02 bylee5

Hello! If I query it via Squirrel and the AgensBrowser it is displayed correctly. I do not have direct access to the machine to try it via terminal.

Michael4713 avatar Feb 04 '19 08:02 Michael4713