From bc23d4c353f5e431b57ea2691b73c888f376925e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Afonso?= Date: Sun, 9 Aug 2015 11:01:16 -0700 Subject: [PATCH] Add Options section to README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index c5f7f45..02dfa04 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,20 @@ npm install jschardet jschardet.detect("\xa6\xb8\xb1\x60\xa5\xce\xb0\xea\xa6\x72\xbc\xd0\xb7\xc7\xa6\x72\xc5\xe9\xaa\xed") // { encoding: "Big5", confidence: 0.99 } +Options +------- + +```javascript +// See all information related to the confidence levels of each encoding. +// This is useful to see why you're not getting the expected encoding. +jschardet.Constants._debug = true; + +// Default minimum accepted confidence level is 0.20 but sometimes this is not +// enough, specially when dealing with files mostly with numbers. +// To change this to 0 to always get something or any other value that can +// work for you. +jschardet.Constants.MINIMUM_THRESHOLD = 0; +``` Supported Charsets ------------------