some corrections related to character encoding