• Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 1.9.5
    • None
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      If a character which would be present in the log call is badly encoded, it can stop FoundationKit from decoding the entire 200-line block of log lines as UTF, and subsequently cause issues with other, properly encoded UTF characters elsewhere.

      Typically this is caused by someone committing from another platform using Latin-1 encoding or similar. Eventually the problem passes into history and extended characters start working again for recent log entries, but it can mess up the display for a while.

      The problem is that the FoundationKit methods for converting NSData to NSString simply abort the entire conversion when a badly encoded character is encountered. Right now we just fall back on other encodings so we can at least display something, but really what we'd like to do is identify where the decoding failed, decode up to that point, decode the problem character some other way, then decode the rest as UTF. Or, force the interpretation as UTF anyway and leave that one character garbled. I haven't found a way to do either on FoundationKit yet, but since this can cause issues that don't appear on some other tools that use other more tolerant decoders (like Java), it deserves another look. Perhaps there is another third party NSData -> NSString decoder we can use instead.

            [SRCTREE-1285] Improve handling of badly encoded characters

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3371933 ] New: JAC Suggestion Workflow 3 [ 3672204 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Workflow Original: SourceTree Bug Workflow [ 450003 ] New: JAC Suggestion Workflow [ 3371933 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Monique Khairuliana (Inactive) made changes -
            Issue Type Original: Improvement [ 4 ] New: Suggestion [ 10000 ]
            Brian Ganninger (Inactive) made changes -
            Assignee Original: Steve Streeting [ sstreeting ]

            I'm the original poster, with the company login.

            I've installed Version 1.9.5.2 and the problem has, indeed, been fixed!
            In our case, it occurred with portuguese characters.
            Thank very much for this fix!
            Excellent work! :-D

            (I did have to wait a long time, though...)

            Impactwave Admin added a comment - I'm the original poster, with the company login. I've installed Version 1.9.5.2 and the problem has, indeed, been fixed! In our case, it occurred with portuguese characters. Thank very much for this fix! Excellent work! :-D (I did have to wait a long time, though...)
            Steve Streeting (Inactive) made changes -
            Fix Version/s New: 1.9.5 [ 43690 ]
            Fix Version/s Original: 2.0.0 [ 30990 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Closed [ 6 ]

            I finally managed to reproduce this to test my fix, it required that I created a commit with Cyrillic 866 encoded characters in it (created on Windows then pushed/pulled onto Mac). In this case I edited the .git/config file and changed the author name to (valid) Russian characters but saved as Cyrillic 866 without also setting git's own i18n.commitencoding. Only the Cyrillic 866 encoding seemed to cause this specific issue, other Cyrillic encodings like Windows-1251 and ISO 8869-5 only corrupted a single line in the log.

            The changes I made fixed the issue and will be present in 1.9.5.

            Steve Streeting (Inactive) added a comment - I finally managed to reproduce this to test my fix, it required that I created a commit with Cyrillic 866 encoded characters in it (created on Windows then pushed/pulled onto Mac). In this case I edited the .git/config file and changed the author name to (valid) Russian characters but saved as Cyrillic 866 without also setting git's own i18n.commitencoding. Only the Cyrillic 866 encoding seemed to cause this specific issue, other Cyrillic encodings like Windows-1251 and ISO 8869-5 only corrupted a single line in the log. The changes I made fixed the issue and will be present in 1.9.5.
            KieranA made changes -
            Fix Version/s New: 2.0.0 [ 30990 ]
            Fix Version/s Original: 1.8.2 [ 38511 ]
            KieranA made changes -
            Fix Version/s New: 1.8.2 [ 38511 ]
            Fix Version/s Original: 1.8.1 [ 37909 ]
            KieranA made changes -
            Fix Version/s New: 1.8.1 [ 37909 ]
            Fix Version/s Original: 1.7.5 [ 37519 ]

              Unassigned Unassigned
              sstreeting Steve Streeting (Inactive)
              Votes:
              3 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: