Fix text encoding errors.

But only for UTF8 & windows-1252
Use the name of the project, not the name relative to root_path.