added character encoding to head