Bug 212625

Summary: Safari 13 on iOS does not correctly render UTF-16LE Chinese characters
Product: WebKit Reporter: Matthew Rister <matthewrister>
Component: TextAssignee: Nobody <webkit-unassigned>
Status: RESOLVED INVALID    
Severity: Normal CC: ap, mmaxfield
Priority: P2    
Version: Safari 13   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
CSV file (tab separated) to reproduce the issue. none

Description Matthew Rister 2020-06-01 21:19:34 PDT
Created attachment 400782 [details]
CSV file (tab separated) to reproduce the issue.

When previewing a downloaded CSV file which is UTF-16LE encoded in Safari on iOS which contains Chinese characters, Safari incorrectly renders the contents of the file. This does render correctly in Excel on iOS and in all other major browsers and text editors. 


Attached is a file that you can use to reproduce the issue. You will need to write a small HTML application that will download the file on a click event. When Safari prompts you to view or download the file, click view. Please note that the file does contain a byte order mark (BOM).

Expected
The file renders Chinese characters correctly.

Actual
The file renders garbled text.
Comment 1 Alexey Proskuryakov 2020-06-02 18:39:08 PDT
I am fairly certain that this issue in not in WebKit, but in an Apple system framework used for previewing downloads. Could you please report it to Apple via https://feedbackassistant.apple.com?

The same issue reproduces when previewing the file in Finder on macOS.