Fix unicode problem and also make display links a bit shorter

actually unicode("msg", "utf-8") does not work here (empirically tested). We need an ASCII string, not a unicode to pass into csv_writer