NEW 199494
[WPE][GTK] Wrong default encoding when browsing a local directory
https://bugs.webkit.org/show_bug.cgi?id=199494
Summary [WPE][GTK] Wrong default encoding when browsing a local directory
Ting-Wei Lan
Reported 2019-07-04 05:43:22 PDT
Created attachment 373460 [details] Screenshot of opening a local directory It seems that WebKitGTK always chooses the text encoding wrongly when browsing a local directory. It is very easy to reproduce. Just type 'file:///' in the address bar, and you will find bad characters appear in the page. Instead of asking users to click 'override text encoding' every time they want to browse local directories or find local HTML files, can WebKitGTK simply default to UTF-8 encoding when a local directory is opened?
Attachments
Screenshot of opening a local directory (50.63 KB, image/png)
2019-07-04 05:43 PDT, Ting-Wei Lan
no flags
Michael Catanzaro
Comment 1 2019-07-12 08:23:27 PDT
Hm, it's tricky. For the directory view, we had better assume UTF-8 indeed. Obviously assuming Latin-1 is wrong. I have no clue where we would have to dive into the code to fix that. But for web content, the default has to be ISO 8859-1 (Latin-1) for web compatibility. Then what about e.g. text files accessed via file://? We use Latin-1 for these too, and it's always wrong. Needs some thought and investigation as to what Chrome does when there are no HTTP headers to indicate encoding and where the content is not an HTML document. (Firefox tries to guess the encoding, but that's risky. Not sure we want to try that.)
Note You need to log in before you can comment on or make changes to this bug.