-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix corrupted utf-8 strings after trimming cell values #1517
Conversation
Usage value[:TotalCellChars] is incorrect. If value contains utf-8 string it may corrupt the last symbol in value.
Maybe it is better to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR. I've left some comments.
It's done, but "resolve conversation" button doesn't work. Don't know why :( |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #1517 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 31 31
Lines 24337 24337
=======================================
Hits 24013 24013
Misses 214 214
Partials 110 110
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution.
Usage value[:TotalCellChars] is incorrect. If value contains utf-8 string it may corrupt the last symbol in value.
PR Details
Bug fix of slicing strings in Go
Description
Excel has upper limit of character count which is 32767, but excelize checks value length by bytes instead by characters.
If I put utf-8 value (repeated 17000 times two-bytes symbol "Ы", for example) to a cell, excelize won't show any error, but file will be corrupted. Excel will show error on this file. Mac Numbers doesn't show any error, but empty cell and half-empty file.
Related Issue
[
](https://github.com//issues/1518)Motivation and Context
How Has This Been Tested
Types of changes
Checklist