Don't try to save a null encoding

git-svn-id: http://google-refine.googlecode.com/svn/trunk@1936 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Tom Morris 2010-11-27 17:54:01 +00:00
parent 850c43d6f3
commit b9fa100d31

View File

@ -484,7 +484,9 @@ public class CreateProjectCommand extends Command {
} else {
// TODO: How do we set character encoding here?
// Things won't work right if it's not set, so pick some arbitrary values
options.setProperty("encoding", encoding);
if (encoding != null) {
options.setProperty("encoding", encoding);
}
options.setProperty("encoding_confidence", "0");
((StreamImporter) importer).read(rawInputStream, project, metadata, options);
}