encode to utf-8 before response