Translate line endings before comparing file contents

This is for #5601 

Also fixed some text style sheets.