Skip to content

fix trim space while value is not unsigned char #14

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

Merged
merged 1 commit into from
Apr 17, 2025

Conversation

shun2wang
Copy link
Contributor

@shun2wang shun2wang commented Mar 14, 2025

Fix: jasp-stats/jasp-issues#3074

According the best practices of https://en.cppreference.com/w/cpp/string/byte/isspace it was undefined if the value of ch is not representable as unsigned char.so the problem may not be entirely a defect of freexl.

Note: you may need a clean build of freexl with this PR but not from conanfile.txt.

@shun2wang
Copy link
Contributor Author

@boutinb @JorisGoosen This is important fix, it also can fix some import .csv bugs.

Copy link
Contributor

@boutinb boutinb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your fix is ok, but it does not seem to solve the issue with the error_-27.xlsx excel file. The error seems to be inside the freexl library.

@shun2wang
Copy link
Contributor Author

Your fix is ok, but it does not seem to solve the issue with the error_-27.xlsx excel file. The error seems to be inside the freexl library.

Yes, because this is the result of freexl and this fix. To completely solve the problem, you need to cooperate with freexl patch PR:jasp-stats/jasp-desktop#5775

@shun2wang shun2wang merged commit ef4dcfc into jasp-stats:master Apr 17, 2025
@shun2wang shun2wang deleted the fixStringTrim branch April 17, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Import Excel returns error code -27
2 participants