<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>184660</bug_id>
          
          <creation_ts>2018-04-16 12:31:15 -0700</creation_ts>
          <short_desc>[GTK] Can&apos;t load local files with accented characters</short_desc>
          <delta_ts>2019-01-12 10:02:39 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=184444</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sebastien">amarok</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>amarok</cc>
    
    <cc>ap</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cdumez</cc>
    
    <cc>cgarcia</cc>
    
    <cc>jenyay.ilin</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1414869</commentid>
    <comment_count>0</comment_count>
    <who name="Sebastien">amarok</who>
    <bug_when>2018-04-16 12:31:15 -0700</bug_when>
    <thetext>I tried to load this HTML page:

```html
&lt;html&gt;
&lt;head&gt;
  &lt;meta charset=“utf-8”&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;img src=&quot;file:///home/AmarOk/T%C3%A9l/t7d4.jpg&quot;&gt;&lt;!-- NOT OK But file exists (works on firefox)--&gt;
&lt;img src=&quot;https://enconn.fr/T%C3%A9l/t7d4.jpg&quot;&gt;&lt;!-- OK --&gt;
&lt;img src=&quot;file:///home/AmarOk/Downloads/1.png&quot;&gt;&lt;!-- OK and file exists--&gt;
&lt;/body&gt;
&lt;/html&gt;
```

And tried to load it via webkit_web_view_load_html or webkit_web_view_load_uri.

# Expected result

3 images should be shown

# Actual result

The first one with a &apos;é&apos; in the path fails to load ([Error] Not allowed to load local resource: file:///home/AmarOk/T%C3%A9l/t7d4.jpg (test.html, line 8))

Didn&apos;t try on another OS</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1415025</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2018-04-16 21:24:36 -0700</bug_when>
    <thetext>This happens because of a mismatch between decomposed and precomposed Unicode forms, and a file system that fails to respect their equivalency. Arguably not fixable from WebKit in the general case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1418196</commentid>
    <comment_count>2</comment_count>
    <who name="Sebastien">amarok</who>
    <bug_when>2018-04-26 12:47:52 -0700</bug_when>
    <thetext>It works on other web engine so why not for WebKit?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1419805</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-05-02 13:10:40 -0700</bug_when>
    <thetext>(In reply to Sebastien from comment #2)
&gt; It works on other web engine so why not for WebKit?

Adding some WebKit-GTK developers in CC since this bug was reported on Linux and I cannot reproduce it on MacOS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1419806</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2018-05-02 13:12:20 -0700</bug_when>
    <thetext>(In reply to Chris Dumez from comment #3)
&gt; (In reply to Sebastien from comment #2)
&gt; &gt; It works on other web engine so why not for WebKit?
&gt; 
&gt; Adding some WebKit-GTK developers in CC since this bug was reported on Linux
&gt; and I cannot reproduce it on MacOS.

URL::fileSystemPath() for example is platform-specific and may be related to the issue here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1419916</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-05-02 16:10:51 -0700</bug_when>
    <thetext>Probably the same as bug #184444?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1420151</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2018-05-03 09:20:27 -0700</bug_when>
    <thetext>&gt; URL::fileSystemPath() for example is platform-specific and may be related to the issue here.

Ah, good point. For files specifically, file system path gets normalized on Darwin. I was thinking more about the same issue in application to HTTP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1491009</commentid>
    <comment_count>7</comment_count>
    <who name="Sebastien">amarok</who>
    <bug_when>2018-12-29 13:59:57 -0800</bug_when>
    <thetext>(In reply to Michael Catanzaro from comment #5)
&gt; Probably the same as bug #184444?

I think it&apos;s a similar bug indeed :)

I didn&apos;t have the time to dig this bug for now. And the only workaround I can do for now is to encode and inject into the page all resources but I really don&apos;t want to do that  :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1493982</commentid>
    <comment_count>8</comment_count>
    <who name="Jenyay">jenyay.ilin</who>
    <bug_when>2019-01-12 10:02:39 -0800</bug_when>
    <thetext>Because of this bug, browsers on the WebKit2 engine (Epiphany for example) do not display images in local HTML files if the path to this file contains non-Latin characters. Also in these files JavaScript scripts do not work.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>