<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>jcranmer</author><text>&amp;gt; It couldn’t be further from the truth. Unix paths don’t need to be valid UTF-8 and most programs happily pipe the mess through into text that should be valid. (Windows filenames don’t have to be proper UTF-16 either)&lt;p&gt;A decent fraction of software can impose rules on the portion of the filesystem within their control. A tool like mv or vim has to be prepared to handle any filepath encoding. But something like a VCS could reasonably insist that they only support filetrees with normalized UTF-8 encoding and no case-insensitive conflicts as the only things reliably working cross-platform.</text><parent_chain><item><author>legulere</author><text>&amp;gt;  In the UNIX world, narrow strings are considered UTF-8 by default almost everywhere. Because of that, the author of the file copy utility would not need to care about Unicode&lt;p&gt;It couldn’t be further from the truth. Unix paths don’t need to be valid UTF-8 and most programs happily pipe the mess through into text that should be valid. (Windows filenames don’t have to be proper UTF-16 either)&lt;p&gt;Rust is one of the few programming languages that correctly doesn’t treat file paths as strings.</text></item></parent_chain></comment><story><title>UTF-8 Everywhere</title><url>http://utf8everywhere.org/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>DannyB2</author><text>&amp;gt; Rust is one of the few programming languages that correctly doesn’t treat file paths as strings.&lt;p&gt;Imagine if languages allowed subtypes of strings which are not directly assignment compatible.&lt;p&gt;HtmlString&lt;p&gt;SqlString&lt;p&gt;String&lt;p&gt;A String could be converted to HtmlString not by assignment, but through a function call, which escapes characters that the browser would recognize as markup.&lt;p&gt;Similarly a String would be converted to a SqlString via a function.&lt;p&gt;It would be difficult to accidentally mix up strings because they would be assignment incompatible without the functions that translate them.&lt;p&gt;There could be mixed &amp;quot;languages&amp;quot; within a string.  Like a JSP or PHP that might contain scripting snippets, and also JavaScript and CSS snippets, each with different syntax rules and escaping conventions.</text><parent_chain><item><author>legulere</author><text>&amp;gt;  In the UNIX world, narrow strings are considered UTF-8 by default almost everywhere. Because of that, the author of the file copy utility would not need to care about Unicode&lt;p&gt;It couldn’t be further from the truth. Unix paths don’t need to be valid UTF-8 and most programs happily pipe the mess through into text that should be valid. (Windows filenames don’t have to be proper UTF-16 either)&lt;p&gt;Rust is one of the few programming languages that correctly doesn’t treat file paths as strings.</text></item></parent_chain></comment><story><title>UTF-8 Everywhere</title><url>http://utf8everywhere.org/</url></story>