Wulf's Webden

The Webden on WordPress

Works… with some work


I help with the Toddlers’ group at church and, after a recent online catch up, one of the team emailed me some files with lyrics for songs we are going to use this term. However, it turned out that they were .wps files, an extension I vaguely recall from years ago when I used to have a copy of Microsoft Works (vaguely because it might have been a couple of decades ago – Works stopped being sold in 2009 although it is clearly still working in places!).

I do have a current version of Microsoft Word on my Mac but that didn’t help (would the version on my Windows box have done any better? I didn’t try that avenue). The best Apple could do was open them with TextEdit, which showed a lot of junk at the top and bottom (probably information about page formatting and the like) but did expose a plain text version of the lyrics. I also also opened them in MacVim but the text wasn’t immediately apparent until I copied and pasted from TextEdit and saw that, even via the clipboard, every single letter was prefixed with a ^@ code. That made it very difficult to read but a solution was beginning to suggest itself.

In the end the process was:

  1. Open the file in TextEdit and copy and paste the text into Vim
  2. Run a global search and replace to get rid of the extraneous characters (^@ is entered by holding Ctrl-Shift-2 — plain old @ is Shift-2 on a Mac — not by manually typing the caret symbol): %s/^@//g
  3. Tidying up other special characters – for example, there were some apostrophes, which called for %s/^Y /'/g
  4. Saving the result

Geek skills FTW! I now have the lyrics I need as a set of plain text files which will work anywhere.