Refine function to add coding utf-8