sbc_compliant: (Default)
[personal profile] sbc_compliant
Beating my head against the desk this week trying to figure out why, with the new mail agent, attached text files appear just fine in GUI editors as plain-text, but show up as one long line with interspersed EOL characters in vi.

Actually, I know *why* -- different formats -- but I don't know *which* format is which. I'm really trying to figure out how to Fixittm.

Saving as Unicode 16-bit doesn't do it. Unicode-8 bit is what it's in, now.

Right now I'm looking up how to search/replace CTRL characters w/in vi or using sed, in an attempt to end-run around the bloody agent.



Edited to add:
Found my kludge. Blech.


  1. save attachment from email.

  2. open attachment in vi, s/^M/#/g1, and :wq

  3. open attachment in TextWrangler, replace all instances of # with \r, and save

  4. re-open attachment in vi to confirm



-----
1: ^M is actually the character sequence: CTRL+v, ENTER. The use of the pound (#) is arbitrary, it merely needs to be a unique sequence not otherwise present in the file.

Profile

sbc_compliant: (Default)
sbc_compliant

November 2019

S M T W T F S
     12
3456789
10111213141516
17181920212223
24252627282930

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 10th, 2026 10:05 pm
Powered by Dreamwidth Studios