You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "digi-scrypt (via GitHub)" <gi...@apache.org> on 2026/06/05 15:08:10 UTC
[PR] fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
digi-scrypt opened a new pull request, #605:
URL: https://github.com/apache/commons-csv/pull/605
1. with byte tracking on (setTrackBytes + a charset), read(char[]) advances lastChar to the last buffer char before counting, and the per-char helper reads that field instead of the actual preceding char, so a surrogate pair gets matched against the wrong neighbor (the loop also ran to length instead of offset+length).
2. a 4-byte char taken through the char[] path, e.g. a multi-character delimiter holding a supplementary character, then throws CharacterCodingException out of nextRecord and getBytePosition() goes wrong.
Passed the previous char explicitly and moved the counting ahead of the lastChar update. What happens for a pair split across two buffer reads is covered too since the first char still pairs against the saved lastChar. Added a regression test next to the existing multi-character-delimiter byte-position one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #605:
URL: https://github.com/apache/commons-csv/pull/605#issuecomment-4993741061
Hello @digi-scrypt
Would you please rebase on git master and resolve conflicts?
TY!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory closed pull request #605: Fix surrogate pair byte counting in ExtendedBufferedReader array read
URL: https://github.com/apache/commons-csv/pull/605
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #605:
URL: https://github.com/apache/commons-csv/pull/605#issuecomment-4945774501
Hello @digi-scrypt
Would you please rebase on git master and resolve conflicts?
TY!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #605:
URL: https://github.com/apache/commons-csv/pull/605#issuecomment-4959740986
@digi-scrypt ping 🔔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #605:
URL: https://github.com/apache/commons-csv/pull/605#issuecomment-4885828399
@digi-scrypt ping 🔔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix surrogate pair byte counting in ExtendedBufferedReader array read [commons-csv]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #605:
URL: https://github.com/apache/commons-csv/pull/605#issuecomment-5004035252
@digi-scrypt
Closing: I added the test to git master since it's green without changes to `main`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org