support nil charset