[Webkit-unassigned] [Bug 172849] New: WKWebView upload file which name contains Chinese character results in garbled code
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 2 00:24:30 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=172849
Bug ID: 172849
Summary: WKWebView upload file which name contains Chinese
character results in garbled code
Product: WebKit
Version: Other
Hardware: Macintosh
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: Forms
Assignee: webkit-unassigned at lists.webkit.org
Reporter: johnhu456 at 163.com
CC: cdumez at apple.com, wenson_hsieh at apple.com
I am working on a Mac app, just a simple web application encapsulated in WKWebView.
Here is the code when I tring to upload a file which name contains special character:
-(void)webView:(WKWebView *)webView runOpenPanelWithParameters:(WKOpenPanelParameters *)parameters initiatedByFrame:(WKFrameInfo *)frame completionHandler:(void (^)(NSArray<NSURL *> * _Nullable))completionHandler
{
DEBUG_FUNC(@"");
NSOpenPanel* openDlg = [NSOpenPanel openPanel];
[openDlg setCanChooseFiles:YES];
[openDlg setCanChooseDirectories:NO];
[openDlg setPrompt:NSLocalizedString(@"Choose", nil)];
openDlg.allowsMultipleSelection = YES;
if ( [openDlg runModal] == NSOKButton )
{
if (completionHandler)
{
completionHandler([openDlg URLs]);
}
}
}
When I was using WebView, this way can work, so it should not be a web problem.
But since the project used WKWebView,
for example: file "证书.p12" would be changed to "è¯ä¹¦.p12" after uploaded via WKWebView.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170602/2246a15f/attachment.html>
More information about the webkit-unassigned
mailing list