Improved encoding guessing for source files