How to replace "\0" with zero?

Nuls are definitely annoying.

Can you give us a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one: