Skip to content

Commit

Permalink
Add note about the meaning of the charset + utf8Sentinel:true combo
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou authored and ljharb committed Jul 31, 2018
1 parent 07329e0 commit 6f17ead
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ If specified, the `utf8` parameter will be omitted from the
returned object. It will be used to switch to `iso-8859-1`/`utf-8`
mode depending on how the checkmark is encoded.

**Important**: When you specify both the `charset` option and the
`utf8Sentinel` option, the `charset` will be overridden when
the request contains a `utf8` parameter from which the actual
charset can be deduced. In that sense the `charset` will behave
as the default charset rather than the authoritative charset.

```javascript
var detectedAsUtf8 = qs.parse('utf8=%E2%9C%93&a=%C3%B8', {
charset: 'iso-8859-1',
Expand Down

0 comments on commit 6f17ead

Please sign in to comment.