modified to display characters of some languages(eg. chinese) correctly