Page 1 of 1

How do I find and replace NULL control characters?

Posted: Fri Jun 07, 2002 1:00 pm
by Merrie Sabota
I have a comma delimited text file that contain the null control character |. When I try to copy, cut or delete the line, TextPad gives me an error 'Cannot cut, copy or drag and drop text containing null(code=0) characters.' A work around is to copy or delete around the characters, but I have a very large file. Any ideas?

Re: How do I find and replace NULL control characters?

Posted: Fri Jun 07, 2002 4:39 pm
by Roy Beatty
Find...: x00
Replace: ~0~<br>
(or whatever)

Now manipulate the file. When you're done, change back the ~0~ strings to x00.

BTW, BCP (for ms Sql Server) will choke on x00's. Your life might be simpler without the x00's in the your data.

Good luck,

Roy