don't replace with ?, just skip it
Emit a warning in case of unallowed characters. Fix another place this
code is used - reuse