[self-interest] Re: beginner trying to run Self on Mac

Toby Ovod-Everett toby at ovod-everett.org
Sat May 5 13:55:13 UTC 2018


Hi Gregg,

 

Well, unfortunately I’m in the US (although there are people who think that Alaska is a different country, so maybe that counts).  Also, I’m about to give you way more answer than you ever wanted!

 

The issue that Emir and Chris have been attempting to address is “smart-quotes”.  For instance, I’m writing this in Outlook.  If you look very carefully, the quotes around smart-quotes look slightly different, both from each other and from this " character) – the left one is Unicode “LEFT DOUBLE QUOTATION MARK”, and the right one is Unicode “RIGHT DOUBLE QUOTATION MARK”.  Both of those are Unicode characters that have no ANSI/ASCII equivalent (they are Unicode code-points U+201C and U+201D respectively).  The original “QUOTATION MARK” character is a neutral (vertical) one that is present in ANSI/ASCII 0x22 and in UNICODE as U+0022.  The same issue shows up with single-quotes – the ANSI/ASCII “APOSTROPHE” character is 0x27 or U+0027, but there are Unicode left and right single quotes at U+2018 and U+2019.  Finally, there is also the ANSI/ASCII “GRAVE ACCENT” character 0x60 (Unicode U+0060).

 

The three ANSI/ASCII quotes characters have special meaning for a Mac/Unix/Linux/BSD/etc. terminal window.  The double-quote one means "this string of text should be considered a single parameter, and variable interpolation should be performed on it".  The single-quote one means 'this string of text should be considered a single parameter, but variable interpolation should not be performed on it'.  The back-quote means `this string of text should be variable interpolated and then executed and the results substituted here before executing the command as a whole`.  Compare the following output:

[toby at vin ~]$ echo "$HOME"

/home/toby

[toby at vin ~]$ echo '$HOME'

$HOME

[toby at vin ~]$ echo `$HOME`

bash: /home/toby: Is a directory

 

The last output is because /home/toby isn’t a valid command – you can’t execute a directory!

 

The problem is that terminal windows for Mac/Unix/Linux/BSD/etc. and Command Prompts for Windows only treat the original ANSI/ASCII characters as proper single and double quote characters with special meaning.  Furthermore, in many monospaced fonts (the kind used in terminal windows and Command Prompts), the Unicode left/right quotes end up looking identical (or almost identical) to the ANSI/ASCII neutral quotes, making it very hard to distinguish.  Many e-mail editors and word processors attempt to helpfully substitute the Unicode left/right quotes for the ANSI/ASCII ones in order to make the e-mails look better, but it ends up creating major problems for copying command lines from e-mail messages (and documentation).

 

The same problem can affect hyphens – the ANSI/ASCII character is 0x45, known in Unicode as “HYPHEN-MINUS”.  Again, many e-mail editors and word processors automatically attempt to substitute one of the various Unicode hyphens: “HYPHEN” (U+2010), “NON-BREAKING HYPHEN” (U+2011), “FIGURE DASH” (U+2012), “EN DASH” (U+2013), “EM DASH” (U+2014), “MINUS SIGN” (U+2212), and there are more!  None of these Unicode-only hyphens have the special meaning accorded to the ANSI/ASCII character in a terminal window or Command Prompt, which leads to problems yet again!

 

Windows 10 added a new option for Command Prompts “Filter clipboard contents on paste” which is turned on by default.  It automatically maps those fancy left/right quotes and special hyphens to the ANSI/ASCII equivalents when pasting into a Command Prompt, thus mitigating the problem introduced by the helpful e-mail editors and word processors.

 

OK – I think that may be enough on this subject!

 

Thanks,

Toby

 

 

 

From: self-interest at yahoogroups.com <self-interest at yahoogroups.com> 
Sent: Saturday, May 5, 2018 5:05 AM
To: self-interest at yahoogroups.com
Subject: Re: [self-interest] Re: beginner trying to run Self on Mac

 



Hi Emir, I wont be happy until I have people from 5 different countries helping me around the clock so thanks. All the quotes I have used in the last 4 or so posts all look identical in my terminal window at the moment (single quotes) I could try hand typing it if you think that will work but right now the prompt is   >    instead of   greggevans:self greggarthurevansgmail.com$ should I clear the terminal and start over? 






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.selflanguage.org/pipermail/self-interest/attachments/20180505/173319c6/attachment.html>


More information about the Self-interest mailing list