replacing null characters

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Arnoud van den Eerenbeem

replacing null characters

Post by Arnoud van den Eerenbeem »

Hello everybody,

I use TextPad mainly for processing huge text files. I have now come across a file in DOS format containing characters reported by TextPad as being null characters. They appear on screen in different forms, all graphical characters known to me from the extended ASCII set. They cannot be selected and replaced, for instance with a space or nothing at all, which is my way of getting rid of unwanted characters.

Can anybody tell me what a null character is and how I should handle them in TextPad?

Thanks in advance for replying.

Arnoud van den Eerenbeemt
Andreas

Re: replacing null characters

Post by Andreas »

Use a regex.
\x00
to find it.
If you have different "strange" characters, these are not all null characters (characters with code zero) as null characters are always displayed in the same way.

Did you open a binary file in text mode?
Derrin Morton

Re: replacing null characters

Post by Derrin Morton »

I have come across this problem. You do not need to open the file in binary format to achieve this common problem.


Sometimes using "Find In files" can work on non text files such as a Word Documents. If the matching text appears as part of a table - the table "line" will be printed as a "null" character. You can save the document with null characters (e.g. Search Results) into a text file and open it using "edit" from DOS. The "null" characters are often smiley faces etc. There is no real way of removing them using coventional "Text" editors - no disrespect Helios.

If the file has tabs I would consider opening it in something like Excel, Using the text wizard to process tabs as delimiters.

Generally the principal is that non printable characters such as Word processor tables are not usually required. I have only ever known such characters to be printed as I have said earlier - using "Find in Files" against none text based files as described.
Post Reply