Add utf-8 encoding directive for specific scenarios only