WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
164330
Audit uses of -[NSURL fileSystemRepresentation] for encoding mistakes
https://bugs.webkit.org/show_bug.cgi?id=164330
Summary
Audit uses of -[NSURL fileSystemRepresentation] for encoding mistakes
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
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2016-11-02 11:13:10 PDT
<
rdar://problem/29070750
>
Radar WebKit Bug Importer
Comment 2
2016-11-02 11:13:53 PDT
<
rdar://problem/29070757
>
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.
Top of Page
Format For Printing
XML
Clone This Bug