Package com.google.refine.importing
Class EncodingGuesser
java.lang.Object
com.google.refine.importing.EncodingGuesser
This class tries to find the correct encoding based on https://github.com/albfernandez/juniversalchardet which is a
Java port of Mozilla's universalchardet library
https://hg.mozilla.org/mozilla-central/file/tip/extensions/universalchardet/
- Author:
- Steffen Stundzig
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidguess(ImportingJob job) static StringguessEncoding(File dir, String location) static voidguessInitialEncoding(List<com.fasterxml.jackson.databind.node.ObjectNode> fileRecords, com.fasterxml.jackson.databind.node.ObjectNode options) uses the first found encoding in the file records as initial encoding and put them into the options
-
Field Details
-
UTF_8_BOM
- See Also:
-
-
Constructor Details
-
EncodingGuesser
public EncodingGuesser()
-
-
Method Details
-
guess
- Throws:
IOException
-
guessEncoding
- Throws:
IOException
-
guessInitialEncoding
public static void guessInitialEncoding(List<com.fasterxml.jackson.databind.node.ObjectNode> fileRecords, com.fasterxml.jackson.databind.node.ObjectNode options) uses the first found encoding in the file records as initial encoding and put them into the options- Parameters:
fileRecords-options-
-