php set encoding utf-8 header code example Example: set charset of response php header('Content-Type: text/html; charset=utf-8');