Skip to content

Commit

Permalink
deps: iconv-lite@0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dougwilson committed Feb 22, 2023
1 parent 5287a44 commit 28192d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

This incorporates all changes after 1.19.1 up to 1.20.2.

* deps: iconv-lite@0.5.2
- Add encoding cp720
- Add encoding UTF-32
* deps: raw-body@3.0.0-beta.1
- deps: iconv-lite@0.5.2

2.0.0-beta.1 / 2021-12-17
=========================
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"depd": "2.0.0",
"destroy": "1.2.0",
"http-errors": "2.0.0",
"iconv-lite": "0.4.24",
"iconv-lite": "0.5.2",
"on-finished": "2.4.1",
"qs": "6.11.0",
"raw-body": "3.0.0-beta.1",
Expand Down
7 changes: 7 additions & 0 deletions test/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,13 @@ describe('bodyParser.json()', function () {
test.expect(200, '{"name":"论"}', done)
})

it('should parse utf-32', function (done) {
var test = request(this.server).post('/')
test.set('Content-Type', 'application/json; charset=utf-32')
test.write(Buffer.from('fffe00007b000000220000006e000000610000006d00000065000000220000003a00000022000000ba8b0000220000007d000000', 'hex'))
test.expect(200, '{"name":"论"}', done)
})

it('should parse when content-length != char length', function (done) {
var test = request(this.server).post('/')
test.set('Content-Type', 'application/json; charset=utf-8')
Expand Down

0 comments on commit 28192d6

Please sign in to comment.