Created attachment 28885 [details] Fix for SheetDataWriter and test case SXSSF replaces Unicode control characters with '?' but fails to write out the preceding characters. A cell containing "value\u0019" should be "value?" but is now "?". Attached is a fix and a test case to prove it.
This issue has been unanswered for a few weeks now. Is there anything more you need to review the patch? The patch is only three lines of code and it makes the SXSSF api consistent with the XSSF api when it comes to escaping cell string values. When SXSSF writes string cells it iterates over the string locking for characters that need escaping. The valid characters are kept in a buffer and are flushed when an escaped character is written. The flushing part is missing for Unicode control characters. That's what this patch adds. We have used the patch in production for five weeks now without any insidents. Please let me know if you need anything more.
I will give my feedback within a few days. Thanks for your patience. Yegor
patch applied in r1362093 Regards, Yegor