From f3e2b9622abb72cb2ad2fddfa130ff4c6fb83d73 Mon Sep 17 00:00:00 2001 From: Matthew Blissett Date: Fri, 28 Nov 2014 10:45:22 +0000 Subject: [PATCH] Add charset=UTF-8 to HTTP Content-Type for reconciliation queries. Fixes problem where non-ASCII characters would be URL encoded as UTF-8, but interpreted according to the whims of the server. --- .../google/refine/commands/recon/GuessTypesOfColumnCommand.java | 2 +- main/src/com/google/refine/model/recon/StandardReconConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main/src/com/google/refine/commands/recon/GuessTypesOfColumnCommand.java b/main/src/com/google/refine/commands/recon/GuessTypesOfColumnCommand.java index 51ca4b85b..3d920d145 100644 --- a/main/src/com/google/refine/commands/recon/GuessTypesOfColumnCommand.java +++ b/main/src/com/google/refine/commands/recon/GuessTypesOfColumnCommand.java @@ -167,7 +167,7 @@ public class GuessTypesOfColumnCommand extends Command { URL url = new URL(serviceUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); { - connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); connection.setConnectTimeout(30000); connection.setDoOutput(true); diff --git a/main/src/com/google/refine/model/recon/StandardReconConfig.java b/main/src/com/google/refine/model/recon/StandardReconConfig.java index 3a8e7d73c..d51c9d123 100644 --- a/main/src/com/google/refine/model/recon/StandardReconConfig.java +++ b/main/src/com/google/refine/model/recon/StandardReconConfig.java @@ -335,7 +335,7 @@ public class StandardReconConfig extends ReconConfig { URL url = new URL(service); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); { - connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); connection.setConnectTimeout(30000); connection.setDoOutput(true);