Refactor syntax unicode win32

There are a few bits and pieces remaining but the bulk of the work is done so no point holding things up while I do the last fiddly wee bits!