But I don't quite understand your question,
I don't think it's safe for you to use char, so why not use varchar?
Can you clarify the requirements? I will write sql server, which I believe will be helpful to you.