• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: en-dash, em-dash, and the like obtained from Safari tab names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >en-dash, em-dash, and the like obtained from Safari tab names (From: Mitchell L Model <email@hidden>)

  • Prev by Date: Re: en-dash, em-dash, and the like obtained from Safari tab names
  • Next by Date: Re: en-dash, em-dash, and the like obtained from Safari tab names
  • Previous by thread: Re: en-dash, em-dash, and the like obtained from Safari tab names
  • Next by thread: Re: en-dash, em-dash, and the like obtained from Safari tab names
  • Index(es):
    • Date
    • Thread