Fix Makefile.
Add: various improvements for handling UTF-8 encoding.