<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:ap@webkit.org" title="Alexey Proskuryakov <ap@webkit.org>"> <span class="fn">Alexey Proskuryakov</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WKWebView upload file which name contains Chinese character results in garbled code"
   href="https://bugs.webkit.org/show_bug.cgi?id=172849">bug 172849</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>aestes@apple.com, webkit-bug-importer@group.apple.com
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">See Also</td>
           <td>
                
           </td>
           <td>https://bugs.webkit.org/show_bug.cgi?id=164330
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WKWebView upload file which name contains Chinese character results in garbled code"
   href="https://bugs.webkit.org/show_bug.cgi?id=172849#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WKWebView upload file which name contains Chinese character results in garbled code"
   href="https://bugs.webkit.org/show_bug.cgi?id=172849">bug 172849</a>
              from <span class="vcard"><a class="email" href="mailto:ap@webkit.org" title="Alexey Proskuryakov <ap@webkit.org>"> <span class="fn">Alexey Proskuryakov</span></a>
</span></b>
        <pre>Thank you, this does reproduce, and is a WebKit issue.

Andy looked at this with me, and this should be the fix. Just need to add a regression test.


Index: Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm
===================================================================
--- Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        (revision 216685)
+++ Source/WebKit2/UIProcess/Cocoa/UIDelegate.mm        (working copy)
@@ -365,7 +365,7 @@

         Vector<String> filenames;
         for (NSURL *url in URLs)
-            filenames.append(url.fileSystemRepresentation);
+            filenames.append(String::fromUTF8(url.fileSystemRepresentation));

         resultListener->chooseFiles(filenames);
     }];</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>