Re: en-dash, em-dash, and the like obtained from Safari tab names
Re: en-dash, em-dash, and the like obtained from Safari tab names
- Subject: Re: en-dash, em-dash, and the like obtained from Safari tab names
- From: Mitchell L Model <email@hidden>
- Date: Sat, 18 Jun 2016 23:21:45 -0400
This gets more interesting. A basic Python script to read the lines of a file that contains one of these characters chokes, e.g. with open(“Test.txt") as oil: fil.readlines()
...
... Traceback (most recent call last): File "<stdin>", line 2, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 603: invalid continuation byte On Jun 18, 2016, at 6:04 PM, Mitchell L Model < email@hidden> wrote:
One of things I want to include is a link to Safari's front tab. I’ve discovered that an en-dash (#8211) and an em-dash (#8212) in the name of a tab turn into Ñ and Ð respectively when I append the tab name to the string.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden