J. King
07d26e3f45
Add BOM handling
Per specification this does not extend to GB18030
3 years ago
J. King
2e2ed16788
Tests for ISO-2022-JP spanning
3 years ago
J. King
d9d92e5e77
Test all spanning other than ISO-2022-JP
ISO-2022-JP will require a more careful implementation to deal with
mode changes to ASCII or Roman mode
3 years ago
J. King
81186973f1
Partial tests for ASCII spanning
3 years ago
J. King
c64a43992b
Prototype span test
3 years ago
J. King
87ec30a375
Explicit constant visibility
Also partially revert change to encoder determination
4 years ago
J. King
c234702cce
Speed up encoding; make ISO 2022-JP more consistent
- The ISO 2022-JP encoder is now static as with all others; this is
slightly slower, but localises the encoder logic to its class
- Indexed encoders now cache pointer tables on first use, yielding
significant performance benefits
- Encoding multiple characters now uses fewer function calls, yielding
moderate performance benefits at the expense of slight complication
4 years ago
J. King
be2134cc71
API re-organization
4 years ago
J. King
808b4128dd
Tests for replacement encoding; readme correction
4 years ago
J. King
ffa3f431d6
Coverage fixes
4 years ago
J. King
d580e93e52
ISO 2022-JP encoder tests and fixes
4 years ago
J. King
10328b6806
Tests for general encoder
4 years ago
J. King
db738bba99
Encoder for x-user-defined
4 years ago
J. King
a57dde6dbd
Style fixes
4 years ago
J. King
cdd1c0182b
Corrected ISO 2022-JP decoder and seeker
4 years ago
J. King
86c2b0d628
Fix coverage
4 years ago
J. King
53b27d1a55
Correct buggy Shift_JIS tests
4 years ago
J. King
96846d061c
Complete Shift_JIS testing
4 years ago
J. King
d45e0be7c3
Typo
4 years ago
J. King
915aa7ca93
Finally fix Shift_JIS seeker
4 years ago
J. King
d9b8cd8dd1
Fixes for multi-byte index-base encoders
- array_flip() retains the last duplicate, when we need the first
- Indexes are now prepared with a list of first-duplicate code points
to search before flipping
- This affected only U+3000 in GBK
- Big5 did not use array_flip(), but its list of override code points
did not include U+2561; Big5 now flips like the others
- EUC-JP had a long list of errors, but this encoding was not
previously released
- Shift_JIS' indexes are probably not correct, still
4 years ago
J. King
9e812ffdf8
Second stab at Shift_JIS
- Decoder implemented, with correct table
- Modernized decoder; may have bugs
- Backwards seeker hopefully, though it does not yet pass fuzzer
4 years ago
J. King
b284056644
Encode correct duplicate pointers in EUC-JP
4 years ago
J. King
46b6ac3c44
Complete and correct EUC-JP implementation
4 years ago
J. King
f7246ccc34
Fix gb18030 seeking; tidy up
4 years ago
J. King
14d67ad49f
Add fuzz test for backwards seeking
Test data is 1025 random bytes; gb18030 still fails
4 years ago
J. King
6417e8f0be
Start overhauling error handling; adjust coverage annotations
4 years ago
J. King
befd1feb3a
Apply stricter house style where possible
4 years ago
J. King
0954518eb5
Fix gb18030 seeking; tidy up
4 years ago
J. King
c82aaf8b80
Add fuzz test for backwards seeking
Test data is 1025 random bytes; gb18030 still fails
4 years ago
J. King
33059a2906
Start overhauling error handling; adjust coverage annotations
4 years ago
J. King
a7142284f5
Apply stricter house style where possible
4 years ago
J. King
85f06186f2
Partial Shift_JIS implementation
4 years ago
J. King
c4a2ae1714
Tests for new features
4 years ago
J. King
200a310f72
Optionally allow surrogates
Also removed unnecessary docblocks
4 years ago
J. King
2e47fde774
Upgrade to PHPUnit 8
5 years ago
J. King
eae901a9e2
Add new methods
5 years ago
J. King
74d8e07a65
Fully corrected WPT test data for EUC-JP
6 years ago
J. King
8dfb1ba984
Initial implementation of EUC-JP
6 years ago
J. King
2810ed9b2a
Full tests for EUC-KR
6 years ago
J. King
1121f32e96
Minor Big5 corrections
6 years ago
J. King
c4cdbdd5c8
Initial implementation of EUC-KR
6 years ago
J. King
c2a8b1ba52
Style fixes
6 years ago
J. King
bfc6c677c5
Complete Big5 tests, with numerous fixes
6 years ago
J. King
5217a6c0bc
Tidying
6 years ago
J. King
32d7fc47b0
Fix HTML test generator; clean up
6 years ago
J. King
55cbc915c3
Refactor HTML-based test generators
6 years ago
J. King
63fccc3c3a
Test UTF-16 EOF handling better
6 years ago
J. King
4a091610e9
Initial implementation of Big5 encoding
Only the decoder is tested, and even that requires more thorough testing.
Testing of seeking and encoding still to come
6 years ago
J. King
d5327a3b83
Implement x-user-defined decoder
Also further refactored tests to better account for one-way encodings
6 years ago