Posts

Showing posts from November, 2012

Fixing microsoft encoding weirdness

Common problem:  Team members use Microsoft for editing.  Microsoft editors do weird things to text files (no eol, etc)  Need to fix in a perforce project but don't want to have to do a lot of manual work. First, create a script file to give perforce for the editor command: > cat urxvt-perforce #!/bin/bash urxvt -geometry 240x80 -e vim $* Next, update perforce, then add the problem files to a change list (make sure that you don't include binary files in the list).  Open the files using the script. Once in vim, use the doargs command to make life nice (reference:  http://vim.wikia.com/wiki/File_format#cite_note-4 ): :argdo set ff=unix|update :argdo set ff=unix|w diff against have revision and IFF good, submit.