Avoid empty charset. Closes: #4214