<div dir="ltr">Hi All,<div><br></div><div>I just ran into an error with </div><div>    FileDirectory >> uri</div><div>and saw this commit comment.  <br></div><div><div><br></div><div><pre>>>><i> Network-fbs.102 <<<
</i>Fix TestURI>>testDirWithHash. Given that FileDirectory>>uri had "encodeForHTTP" commented out, </pre><pre>I'd appreciate extra pair of eyes on this change. If there are good reasons not to URI-encode </pre><pre>the path bits, please add a comment explaining why!
</pre>HTTP encoding of the drive letter colon on Windows breaks uri's and other http encoded characters or even an encoded space also fail if you use the uri path to do something like retrieving files.  It seems to me the FileDirectory class >> pathFromURI: should return something that works with FileDirectory class >> on: </div></div><div><br></div><div>Our code does this: </div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">      </span>(FileDirectory on: (FileDirectory default pathFromURI: aPathName ))</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>  fileNames</div></div><div><br></div><div>I started doing some research and windows seems to require UTF-16 for file names.  I saw convertToSystemString which I thought might actually be the right answer but it only does UTF8 which is wrong.  </div><div><br></div><div>the two possible solutions are that I change my code to do </div><div><div> </div><div>(FileDirectory on: (FileDirectory default pathFromURI: aPathName ) unescapePercents)</div><div><span class="inbox-inbox-Apple-tab-span" style="white-space:pre">   </span><span class="inbox-inbox-Apple-converted-space"> </span> fileNames</div></div><div><br></div><div>or we remove the encodeForHTTP and put it back the way it was on</div><div>FileDirectory >> uri</div><div><br></div><div>I'll also note that FileURL >> pathString also does encodeForHTTP which I think is correct since you are looking for a URL not a FileDirectory and would expect HTTP encoding.</div><div><br></div><div>Thoughts?</div><div><br></div><div>All the best,</div><div><br></div><div>Ron Teitelbaum </div><div><br></div><div><br></div></div>