Skip to content

Commit

Permalink
syntax highlighting for readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
runk committed Nov 15, 2013
1 parent 7bd721b commit c429ac9
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


chardet [![Build Status](https://travis-ci.org/runk/node-chardet.png)](https://travis-ci.org/runk/node-chardet)
=====

Expand All @@ -9,16 +8,20 @@ occurency analysis to determine the most probable encoding.

## Installation

npm install chardet
```
npm i chardet
```

## Usage

var chardet = require('chardet');
chardet.detect(new Buffer('hello there!'));
// or
chardet.detectFile('/path/to/file', function(err, encoding) {});
// or
chardet.detectFileSync('/path/to/file');
```javascript
var chardet = require('chardet');
chardet.detect(new Buffer('hello there!'));
// or
chardet.detectFile('/path/to/file', function(err, encoding) {});
// or
chardet.detectFileSync('/path/to/file');
```

## Supported Encodings:

Expand Down Expand Up @@ -51,4 +54,4 @@ occurency analysis to determine the most probable encoding.
* windows-1256
* KOI8-R

Currently only these encodings are supported, more will be added soon.
Currently only these encodings are supported, more will be added soon.

0 comments on commit c429ac9

Please sign in to comment.