Home Download Buy Blog Forum Support

Convert selection to ASCII?

Convert selection to ASCII?

Postby natebeaty on Tue Sep 20, 2011 2:38 pm

I use the TextMate command Converting / Stripping > Transliterate Word to ASCII (there's a mouthful) quite often to strip out "smart" quotes, emdashes and the like. Or convert them to their ASCII equivalents, rather, so “ becomes ", etc.

Is this functionality by any chance built into ST2? (Nothing comes up in cmd-shift-P). Or anybody have a Python solution handy?
natebeaty
 
Posts: 120
Joined: Wed Apr 06, 2011 8:28 pm
Location: Chicago, IL

Re: Convert selection to ASCII?

Postby jbrooksuk on Tue Sep 20, 2011 3:14 pm

The only encoding I know of is Ctrl+Shift+P: HTML: Encode Special Characters?

Shame, we need more really!
jbrooksuk
 
Posts: 761
Joined: Sun Apr 11, 2010 10:37 am
Location: England

Re: Convert selection to ASCII?

Postby funkjedi on Tue Sep 20, 2011 7:01 pm

I wrote a very rudimentary command for that. I mostly use it for cleaning up text that's been pasted from Word.
https://github.com/funkjedi/SublimePackages/blob/master/User/normalize_unicode_punctuation.py
funkjedi
 
Posts: 3
Joined: Tue Sep 20, 2011 6:55 pm

Re: Convert selection to ASCII?

Postby natebeaty on Tue Sep 20, 2011 9:33 pm

funkjedi wrote:I wrote a very rudimentary command for that. I mostly use it for cleaning up text that's been pasted from Word.
https://github.com/funkjedi/SublimePackages/blob/master/User/normalize_unicode_punctuation.py


Nice! Thanks, that works great.
natebeaty
 
Posts: 120
Joined: Wed Apr 06, 2011 8:28 pm
Location: Chicago, IL

Re: Convert selection to ASCII?

Postby bloodylyons on Thu May 23, 2013 10:23 am

That Github link is dead, anybody have the plugin lying around that they can share?
bloodylyons
 
Posts: 2
Joined: Mon Jan 07, 2013 11:43 am

Re: Convert selection to ASCII?

Postby icylace on Fri May 24, 2013 6:08 am

icylace
 
Posts: 47
Joined: Mon Jan 14, 2013 7:24 am


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 12 guests