<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Do we need to unescape if it's not a <a class="moz-txt-link-freetext" href="file://">file://</a> url?</tt><tt> I was
hoping we could find some IUri/path API flags to do what we need
for us.</tt><br>
<br>
<tt>Another concern is path/url max lengths are used seemingly
randomly, and it's not a problem with your change, but with
existing code.</tt><tt> I think asking for required length and
allocating it is better.</tt><br>
<br>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">+ /* Regular local path with some URL encoded characters. */
+ strcpy(path2, path);
+ n = strlen(path2);
+ path2[n-1] = '%';
+ path2[n] = '6';
+ path2[n+1] = 'C';
+ path2[n+2] = '\0'; /* C:\path\to\winetest.xm%6C */
+ test_doc_load_from_path(doc, path2);</pre>
</blockquote>
<tt>Could you make this more readable? Maybe strcat-ing escaped file
name as string literal instead.</tt><br>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">+ /* Regular local path with all URL encoded characters. */
+ percent_path = HeapAlloc(GetProcessHeap(), 0, 3*n + 1);
+ for (i = 0; i < n; i++)
+ {
+ static char hex_tab[] = "0123456789ABCDEF";
+ percent_path[3*i] = '%';
+ percent_path[3*i + 1] = hex_tab[path[i] >> 4];
+ percent_path[3*i + 2] = hex_tab[path[i] & 0xF];
+ }
+ percent_path[3*n] = '\0';
+ test_doc_load_from_path(doc, percent_path);
+ HeapFree(GetProcessHeap(), 0, percent_path);</pre>
</blockquote>
<tt>Couple of cases would be enough, like you did earlier for "l"
-> %6c, and another one for " " -> %20. Space is actually
not tested by this patch, and that's what application is using. If
you still want to encode it entirely, please add a helper
function.</tt><br>
</body>
</html>