Actions
Defect #40020
closedScmData.binary? incorrectly considers UTF-8 text as binary
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
Currently, the binary?
method in Redmine::Scm::Adapters::ScmData
often misclassifies Unicode text as binary. This is because the method actually checks whether the given data is ASCII text or not.
The new implementation in the attached patch checks for control characters excluding tabs, newlines, and carriage returns, and calculates their proportion in the data. It ensures accurate detection of binary data while properly handling Unicode text.
Files
Actions