encodeNonUTF method.