ashtuchkin / iconv-lite

Convert character encodings in pure javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encoding inaccurate

underdofg opened this issue · comments

So I've encoded this string

"%0E%04%0E%38%0E%13%0E%04%0E%37%0E%2D%0E%25%0E%39%0E%01%0E%04%0E%49%0E%32%00%20%00%22%00%41%00%49%00%53%00%20%0E%40%0E%0B%0E%40%0E%23%0E%40%0E%19%0E%14%00%20%00%47%00%6F%00%6C%00%64%00%22%00%20%0E%2B%0E%21%0E%32%0E%22%0E%40%0E%25%0E%02%00%20%00%30%00%38%00%39%00%31%00%31%00%39%00%31%00%39%00%39%00%31"

image

This is what i should get from decode function.

But this what I got and the source of decode function has changed too.

image

Example code :

const decodeBody = iconcv.decode(utf-16 string , 'utf16')