Fix 1.9 support by adding encoding header.