If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
Convert those dastardly curly quotes to straight quotes on Windows?
He who is harry newton said on Sat, 7 Oct 2017 21:38:03 +0000 (UTC):
How can we convert those dastardly curly quotes to straight quotes on Windows? http://i67.tinypic.com/2h5mjbr.jpg I like to save into TEXT files on Windows technical information cut and pasted from disjoint news articles where the unprintable curly quotes drive me nuts! Here is a screenshot of a sample cut and paste: http://i67.tinypic.com/2h5mjbr.jpg I tried cutting from the web and pasting into MS Word and then cutting from MS Word and pasting into the text file - but the dastardly curly quotes were still there. I tried using Google Gmail, pasting into a composition window and then hitting the "Tx" format text button, and even changing the font to some other font, but the dastardly curly quotes were still there. Since almost every technical web site uses the dastardly curly quotes, how can I just get *rid* of them using a Windows method so that I can have a text file that contains normal quotes? Here's just one sample but the web is filled with dastardly curly quotes! http://theverge.com/2017/10/6/16437790/iphone-8-swollen-battery-issue-apple-investigating TESTED SOLUTION: ================================================== ======================== The vi "ga" command reports the following decimal values: '9' apostrophe is decimal 146 (aka %d146) == replace with decimal 39 (') '66' smartquote is decimal 147 (aka %d147) == replace with decimal 34 (") '99' smartquote is decimal 148 (aka %d148) == replace with decimal 34 (") ================================================== ======================== To replace curly apostrophes with straight apostrophes on Windows :%s/control+q+146/'/g To replace curly quotes with straight quotes on Windows :%s/[control+q+147,control+q+148]/"/g ================================================== ======================== ROUGH TRANSLATION: : = command % = for the entire file s = search / = for control+q = a non-keyboard value follows) - use control+v on Linux 146 = the non-keyboard decimal value for the '9' curly apostrophe / = then replace it with ' = the normal standard keyboard apostrophe /g = and do that globally for all instances found ================================================== ======================== QED |
Ads |
Thread Tools | |
Display Modes | Rate This Thread |
|
|