use char encoding for db