Bug 164330

Summary: Audit uses of -[NSURL fileSystemRepresentation] for encoding mistakes
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ap, darin, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=164311
https://bugs.webkit.org/show_bug.cgi?id=172849

Andy Estes
Reported 2016-11-02 11:11:50 PDT
We found in https://bugs.webkit.org/show_bug.cgi?id=164311 that converting the char* returned by -[NSURL fileSystemRepresentation] to a String will interpret a UTF-8 sequence as Latin-1. We should audit our code to see if we are making this mistake elsewhere.
Attachments
Radar WebKit Bug Importer
Comment 1 2016-11-02 11:13:10 PDT
Radar WebKit Bug Importer
Comment 2 2016-11-02 11:13:53 PDT
Darin Adler
Comment 3 2016-11-05 15:44:21 PDT
And as I mentioned in that bug, generally if we want to make a String, we probably don’t want use -[NSURL fileSystemRepresentation]. I believe we can use either -[NSURL path] or CFURLCopyFileSystemPath instead to avoid the encoding/decoding process.
Note You need to log in before you can comment on or make changes to this bug.