> I'm working on why that multiple-search-and-replace syntax failed.
I don't know why the [\%d,\%d] syntax failed, but I found another way to do
it by using [control+-x,control+-y] instead.
<
http://wetakepic.com/images/2017/10/09/solved.jpg>
Here is a summary of the problem set and the solution:
Good: (") <== straight quotes
Good: (") <== straight quotes
Good: (") <== straight quotes
Bad: (+IBw-)(+IB0-) <== curly quotes
Bad: (+IBw-)(+IB0-) <== curly quotes
Bad: (+IBw-)(+IB0-) <== curly quotes
:set encoding=cp1252 --> tells vim to use Windows-1252 character encoding
:set coding=utf-8 --> tells vim to return to UTF-8 encoding.
Typing "ga":
The '66' curly quotes show up as ~S, ^S, [147], Hex 93, Octal 223
The '99' curly quotes show up as ~T, ^T, [148], Hex 94, Octal 224
Typing \%d147 & \%d148 works alone but not in a dual search:
:s/\%d147/"/g ==> replaces all '66' curly quotes with straight quotes
:s/\%d148/"/g ==> replaces all '99' curly quotes with straight quotes
But they don't work together for some reason:
:s/[x,y]/z/g ==> works fine to replace x and/or y with z throughout the file
:s/[\%d147,\%d148]/"/g ==> fails to replace for every line of the file
Likewise:
:s/x\|y/z/g ==> works fine to replace x and/or y with z throughout the file
:s/\%d147\|\%d148/"/g ==> fails to replace for every line of the file
Typing "vy" will copy the non-printing character into the vi register.
Control +- V +- [char] = paste works on Linux (use Control+-Q for Windows)
:%s/[control+-v+-147,control+-v+-148]/"/g ==> replaces with straight quotes on Linux
:%s/[control+-q+-147,control+-q+-148]/"/g ==> replaces with straight quotes on Windows
<
http://wetakepic.com/images/2017/10/09/solved.jpg>