refine Ctype and Encoding of java