Here's a follow-up in case someone else needs this one day:
Editing the emlx files in vi worked fine (though the file format is a funny one - perhaps most of the underlying format is something else - MIME, p'raps? - it took me a while to work out some issues), but I needed to re-import them all in order to have the changes recognised.
Notes from along the way:
- Character encoding problems (壿ö etc.) in vi didn't affect the end result.
- The first characters of the file (numeric) seem to denote the number of characters after which no further text will be displayed. So 884 means that only the next 884 characters will be displayed by Mail (or Quicklook). This appears to be so that the XML from the end of the file isn't shown at the front end, but surely there'd have been a cleverer way of doing that. Anyway...
- The order of the From, To and Subject fields in the header can mean that Mail won't display values against them.
For example, I'd received emails where Subject was last (after all sorts of X-Mailer, Originating-IP etc. gumpf), and this meant that Mail never displayed it. It worked fine in Quicklook, however. Swapping the order fixed it.
- Finally, some emails didn't take any of their From, To and Subject fields with them when transferring to Gmail (via IMAP). They'd appear fine on a local mailbox, though. In the end this appeared to come down to there being an indented, additional date stamp immediately after the character count truncating thang mentioned above. For example:
2633
Sat, 19 Aug 2000 GMT
Once I'd removed that it was fine in both places.
Take all this with a big grain of salt if you need to do something similar yourself (and BACK UP!) - but I'm hoping it might help someone else in a similar situation one day.