<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Trouble with Smart Quotes, etc]]></title><description><![CDATA[<p dir="auto">Someone sent you here because you were probably having trouble with smart directional (aka angled or curly) quotes. Most often this is an issue with Macs because they do “smart punctuation” replacement, including in TextEdit, the default text editor.</p>
<p dir="auto">This is mostly a problem for quotes, where it changes quotes (<code>"</code>) to their <em>directional</em> alternatives (<code>“</code> or <code>”</code>).  <a href="https://support.apple.com/kb/PH25699?viewlocale=en_MK&amp;locale=en_MK" target="_blank" rel="noopener noreferrer nofollow ugc">Here is their support document on the topic.</a> When writing prose, this is generally a good idea. In writing code, it’s not.</p>
<p dir="auto">In Windows, such smart replacement done at a program level on certain word processors, like Microsoft Word, but not in things like Notepad, the default text editor for Windows. This is why it’s more of a problem for Mac users.</p>
<p dir="auto">Straight double quotes (<code>"</code>) are different characters from open and close quotes (<code>“</code> or <code>”</code>). They look very similar to us, but the JavaScript/Node.js parser doesn’t think so. Straight quotes have the code points of <code>U+0022</code> or <code>U+0027</code>, but <a href="https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html" target="_blank" rel="noopener noreferrer nofollow ugc">directional quotes have completely separate code points</a>.</p>
<p dir="auto">If you’re having trouble with smart quotes, you’ll need to start using a proper text editor that doesn’t allow the system to automatically insert directional quotes. The default editor on Mac (called TextEdit) is much more of a note taking or word processing program (much more like WordPad) than a text editor for <em>code</em>. It doesn’t understand code, and does things that break it. Use a true text editor like <a href="https://atom.io/" target="_blank" rel="noopener noreferrer nofollow ugc">Atom</a>, <a href="https://www.barebones.com/products/bbedit/" target="_blank" rel="noopener noreferrer nofollow ugc">BBEdit</a>, <a href="https://macromates.com" target="_blank" rel="noopener noreferrer nofollow ugc">TextMate</a>, etc. Or more sophisticated tools like <a href="https://panic.com/coda/" target="_blank" rel="noopener noreferrer nofollow ugc">Coda</a>. Pick one, download it, install it, and use that to open/edit/save your config and other code files. (<strong>NB</strong>: I recommend Atom because it is supported and distributed by GitHub, is free, and is well-supported and open-source, with a good plugin architecture and community. YMMV.)</p>
<p dir="auto">Once you’ve downloaded and installed Atom (by moving it to your <code>~/Applications</code> folder on your Mac) you can run it then open the file, or right-click a file and select “Open with…” and choose Atom. Not only will it <strong>not break</strong> your code, it will colour-code (called “syntax-highlighting”) it, show you where brackets/braces match, and can help to make your code legible (called “Beautify” in Atom).</p>
<p dir="auto">In order to edit <em>remotely</em> on (for example) a Raspberry Pi on your local network, you can use an SFTP client like <a href="https://filezilla-project.org/download.php?platform=osx" target="_blank" rel="noopener noreferrer nofollow ugc">FileZilla</a> or <a href="https://cyberduck.io/" target="_blank" rel="noopener noreferrer nofollow ugc">CyberDuck</a>. SFTP will need to be enabled on your RPi. You can then connect to the RPi and edit files remotely (not download, edit, upload; both programs have an “edit” option that will let you edit and save remotely in an editor … change it to Atom for js/css/html files in the preferences). This should allow you to edit files on your MM remotely.</p>
]]></description><link>https://forum.magicmirror.builders/topic/6749/trouble-with-smart-quotes-etc</link><generator>RSS for Node</generator><lastBuildDate>Mon, 20 Jul 2026 13:21:34 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/6749.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Mar 2018 16:50:49 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trouble with Smart Quotes, etc on Sat, 10 Mar 2018 22:29:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ninjabreadman" aria-label="Profile: ninjabreadman">@<bdi>ninjabreadman</bdi></a></p>
<p dir="auto">Excellent idea, sir. I’m only sorry you thought of it first. ;-)</p>
]]></description><link>https://forum.magicmirror.builders/post/36859</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/36859</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Sat, 10 Mar 2018 22:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble with Smart Quotes, etc on Sat, 10 Mar 2018 22:21:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mykle1" aria-label="Profile: Mykle1">@<bdi>Mykle1</bdi></a> Thanks! I keep seeing it mentioned in the forums,  and wanted to give us all a quick way to refer people to help. I’d already written most of it with <a href="https://forum.magicmirror.builders/topic/6719/modules-assistance-for-mm-newbie-help/">all of my responses here</a> so I decided to rearrange them into a freestanding post.</p>
]]></description><link>https://forum.magicmirror.builders/post/36858</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/36858</guid><dc:creator><![CDATA[ninjabreadman]]></dc:creator><pubDate>Sat, 10 Mar 2018 22:21:31 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble with Smart Quotes, etc on Sat, 10 Mar 2018 21:54:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ninjabreadman" aria-label="Profile: ninjabreadman">@<bdi>ninjabreadman</bdi></a></p>
<p dir="auto">Damn, why didn’t I think of this tutorial? :-)</p>
]]></description><link>https://forum.magicmirror.builders/post/36853</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/36853</guid><dc:creator><![CDATA[Mykle1]]></dc:creator><pubDate>Sat, 10 Mar 2018 21:54:59 GMT</pubDate></item></channel></rss>