How to find NULL characters

General discussions about Advanced Find and Replace
Post Reply
garchamb
Posts: 4
Joined: Mon Nov 26, 2007 2:30 pm

How to find NULL characters

Post by garchamb »

Hello,

Is there a way to find (or remove) NULL characters from text (ASCII) files with AFR?
For an unknown reason, NULL characters are inserted into some messages and I would like to remove them automaticaly or at least find them and remove them manually.

Thanks,

Gilles A.

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: How to find NULL characters

Post by Abacre »

You can use regular expressions.
It depends on what do you mean by NULL chars? Do you mean 00 bytes?
For example, go to Batch Replace,
check "Use regular expressions"
put \x00 into Search For and nothing should be in Replace With part.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

garchamb
Posts: 4
Joined: Mon Nov 26, 2007 2:30 pm

Re: How to find NULL characters

Post by garchamb »

Roman wrote:It depends on what do you mean by NULL chars? Do you mean 00 bytes?
Yes, this is exactly what I mean.

Thank you very much, I will try that out.

Gilles A.

garchamb
Posts: 4
Joined: Mon Nov 26, 2007 2:30 pm

Re: How to find NULL characters

Post by garchamb »

Hello,

I sent an email to support@abacre.com where you will find a sample file that contains a 00 byte char.
I have tried to search with : \x00, '\x00' and "\x00" without success.
I also tried the Find, Replace and Batch Replace tabs without success.

Can you please give me more explanation and use my sample file as an example.

Thanks,

Gilles A.

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: How to find NULL characters

Post by Abacre »

We received your mail. The correct syntax is \x00 or \x{00}
We made some test and it looks like it does not work with 00 char.
We are working on it right now. We will send you email then (later on today or tomorrow).
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

garchamb
Posts: 4
Joined: Mon Nov 26, 2007 2:30 pm

Re: How to find NULL characters

Post by garchamb »

Roman wrote:...
We are working on it right now. We will send you email then (later on today or tomorrow).
Hi Roman,

I have no news from you.
Are you still working on this case?

Gilles A.

Abacre
Site Admin
Posts: 1223
Joined: Mon Jan 31, 2005 5:32 pm

Re: How to find NULL characters

Post by Abacre »

We are still working on it. You know that in some programming languages strings are NULL-terminated. So it's a little bit special case to remove NULL chars.
Kind regards,
Abacre Limited
http://www.abacre.com
support@abacre.com

seraulu1
Posts: 1
Joined: Thu Apr 01, 2010 8:37 am

Re: How to find NULL characters

Post by seraulu1 »

garchamb wrote:Hello,

I sent an email to support@abacre.com where you will find a sample file that contains a 00 byte char.
I have tried to search with : \x00, '\x00' and "\x00" without success.
I also tried the Find, Replace and Batch Replace tabs without success.

Can you please give me more explanation and use my sample file as an example.

Thanks,

Gilles A.
Thanks for these too!!!!!!!!!hypnosis downloads

Nicole34
Posts: 1
Joined: Thu Sep 02, 2010 6:44 am

Re: How to find NULL characters

Post by Nicole34 »

We managed to get around the problem in the end.
So for future reference:
we used od -b to turn the file into octal format. We then did a grep for " 000" in the file (note space before 000). This confirmed the file had a null character.
Just finding files with the null character was sufficient - we didn't look any further into replacing the null character.
Thanks...best way to get rid of acne

Post Reply