I've currently only tested with utf8 files. I don't know what will happen with other encodings. Should probably allow an --encoding argument.