debug character encoding