{"id":860,"date":"2010-03-07T17:05:48","date_gmt":"2010-03-07T22:05:48","guid":{"rendered":"http:\/\/adam.rosi-kessel.org\/weblog\/?p=860"},"modified":"2010-03-07T17:09:04","modified_gmt":"2010-03-07T22:09:04","slug":"windows-curly-quotes-accented-characters-on-linux-samba-shares-and-cygwin-xterm","status":"publish","type":"post","link":"https:\/\/adam.rosi-kessel.org\/weblog\/2010\/03\/07\/windows-curly-quotes-accented-characters-on-linux-samba-shares-and-cygwin-xterm","title":{"rendered":"Windows curly quotes, accented characters on Linux Samba Shares and Cygwin XTerm: How to get Windows-1252 (AKA CP1252) from Linux"},"content":{"rendered":"<p>Before I forget: I have a bunch of files I mirror between Windows\/NTFS and Linux\/ext4 filesystems that include not only accented characters but curly quotes in the filenames. (I know: the easiest solution would be to just get rid of the extended characters). The curly quotes were created in Windows, so don&#8217;t render properly in standard Linux character sets (UTF-8, iso8859-1, iso8859-15, etc.).<\/p>\n<p>This all came up because iTunes under Windows couldn&#8217;t find curly-quote files when it was reading from the exported Samba share filesystem rather than an attached NTFS drive. The files showed up as missing because they had different filenames.<\/p>\n<p>The solution was not easily google-able, so for the record, in brief, add this to the [Global] section of \/etc\/samba\/smb.conf:<\/p>\n<pre><code>unix charset = cp1252\r\ndisplay charset = cp1252\r\n<\/code><\/pre>\n<p>And reload Samba.<\/p>\n<p>Also, to make the characters render properly from a terminal on the Linux box, first create the relevant character set:<\/p>\n<pre><code>sudo localedef -f CP1252 -i en_US en_US.CP1252<\/code><\/pre>\n<p>Now you can use this charset on your Linux box, and, like magic, the curly characters will be back:<\/p>\n<pre><code>export LC_ALL='en_US.cp1252'<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Before I forget: I have a bunch of files I mirror between Windows\/NTFS and Linux\/ext4 filesystems that include not only accented characters but curly quotes in the filenames. (I know: the easiest solution would be to just get rid of the extended characters). The curly quotes were created in Windows, so don&#8217;t render properly in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17,15,26,19],"tags":[],"_links":{"self":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts\/860"}],"collection":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/comments?post=860"}],"version-history":[{"count":9,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts\/860\/revisions"}],"predecessor-version":[{"id":869,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/posts\/860\/revisions\/869"}],"wp:attachment":[{"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/media?parent=860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/categories?post=860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adam.rosi-kessel.org\/weblog\/wp-json\/wp\/v2\/tags?post=860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}