Switch to UTF-8, fix signed correctness, more.

- Converted source files to UTF-8.
- Fixed unwanted conversions between signed and unsigned type.
- Removed use of non-standard CL features.