From 80c13e4b597fd305b404989a100ee3bf1d4fef5a Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Fri, 18 Nov 2011 20:52:49 +0000 Subject: [PATCH] Issue 486 - make sure project character encoding doesn't get set to "" git-svn-id: http://google-refine.googlecode.com/svn/trunk@2381 7d457c2a-affb-35e4-300a-418c747d4874 --- .../com/google/refine/importing/ImportingUtilities.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main/src/com/google/refine/importing/ImportingUtilities.java b/main/src/com/google/refine/importing/ImportingUtilities.java index d0b76a3cf..d9fc04c62 100644 --- a/main/src/com/google/refine/importing/ImportingUtilities.java +++ b/main/src/com/google/refine/importing/ImportingUtilities.java @@ -912,7 +912,12 @@ public class ImportingUtilities { ) { ProjectMetadata pm = new ProjectMetadata(); pm.setName(JSONUtilities.getString(optionObj, "projectName", "Untitled")); - pm.setEncoding(JSONUtilities.getString(optionObj, "encoding", "UTF-8")); + String encoding = JSONUtilities.getString(optionObj, "encoding", "UTF-8"); + if ("".equals(encoding)) { + // encoding can be present, but empty, which won't trigger JSONUtilities default processing + encoding = "UTF-8"; + } + pm.setEncoding(encoding); record.parser.parse( project,