Subject: | Bug fixes for Unicode.xs |
Hi Dan,
I have addressed the following bugs:
UTF-16
Fixed an issue where Unicode.xs produced ill-formed UTF-16 when attempting
to encode code points above U+10FFFF. Code points above U+10FFFF is now
correctly replaced with U+FFFD.
UTF-16
Fixed an issue where Unicode.xs ignored trailing high surrogates when
decoding. Trailing high surrogates is now correctly replaced with
U+FFFD unless the ENCODE_STOP_AT_PARTIAL flag is set.
UCS-2, UTF-16, UTF-32
Fixed an issue where Unicode.xs assumed high surrogate was followed by a low
surrogate, this resulted in data loss when isolated high surrogates (ill-formed)
where decoded. <0xD800 0x263A> is now correctly decoded as "\x{FFFD}\x{263A}",
previously it was decoded as "\x{FFFD}".
Sent as a pull request on github, <https://github.com/dankogai/p5-encode/pull/5>
--
chansen