Skip to content

Commit 192293e

Browse files
Update indexes to pick up windows-1255 change, add test. Resolves inexorabletash#59
1 parent 2768123 commit 192293e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/encoding-indexes.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/test-misc.js

+6
Original file line numberDiff line numberDiff line change
@@ -385,3 +385,9 @@ test(function() {
385385
assert_array_equals([].slice.call(encoder.encode(false)), [102, 97, 108, 115, 101]);
386386
assert_array_equals([].slice.call(encoder.encode(0)), [48]);
387387
}, 'encode() called with falsy arguments (polyfill bindings)');
388+
389+
test(function() {
390+
// Regression test for https://github.com/inexorabletash/text-encoding/issues/59
391+
assert_array_equals(
392+
new TextDecoder('windows-1255').decode(new Uint8Array([0xCA])), '\u05BA');
393+
}, 'windows-1255 map 0xCA to U+05BA');

0 commit comments

Comments
 (0)