Bug 245742 - [webkit-patch] Parse non-utf characters
Summary: [webkit-patch] Parse non-utf characters
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
: 245690 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-27 10:53 PDT by Jonathan Bedard
Modified: 2022-12-12 15:36 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2022-09-27 10:53:18 PDT
When we are parsing patches and diffs, we should at least not crash when parsing non-utf characters, even if we can't accurately display or reason about such characters.
Comment 1 Radar WebKit Bug Importer 2022-09-27 10:53:37 PDT
<rdar://problem/100466774>
Comment 2 Jonathan Bedard 2022-09-27 10:54:51 PDT
Pull request: https://github.com/WebKit/WebKit/pull/4759
Comment 3 Jonathan Bedard 2022-09-28 13:40:40 PDT
For posterity's sake, would like to address something brought up in a Slack thread about this change.

It would be possible to make our style checker and commit message builder operate on bytes instead of strings, which would avoid needing to replace non UTF-8 characters, however, that would require pretty extensive changes to our style checker code. Given that we don't really expect lines with non UTF-8 characters to be handled correctly in the style checker anyways, replacing them so we can at least run the style checker over files with non UTF-8 characters seems prudent.
Comment 4 EWS 2022-09-28 13:44:14 PDT
Committed 254967@main (cd13c6e5c9e2): <https://commits.webkit.org/254967@main>

Reviewed commits have been landed. Closing PR #4759 and removing active labels.
Comment 5 Ryan Reno 2022-09-29 09:32:04 PDT
*** Bug 245690 has been marked as a duplicate of this bug. ***
Comment 6 Jonathan Bedard 2022-09-29 11:12:43 PDT
Re-opening for pull request https://github.com/WebKit/WebKit/pull/4834
Comment 7 EWS 2022-12-12 15:36:55 PST
Committed 257761@main (3c2f6580b5c3): <https://commits.webkit.org/257761@main>

Reviewed commits have been landed. Closing PR #4834 and removing active labels.