Bug 164330
| Summary: | Audit uses of -[NSURL fileSystemRepresentation] for encoding mistakes | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Andy Estes <aestes> |
| Component: | New Bugs | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/29070750>
Radar WebKit Bug Importer
<rdar://problem/29070757>
Darin Adler
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.