Which text editors (free or commercial) handle character encoding and Windows/Unix line breaks properly?
On Windows you can use PowerShell ISE for editing files with Unix line breaks.
The only side-effect I observed is that you have to set "Save as type" to "All files" on "Save As..." command to avoid appending .ps1 file extension.