I've run into this problem before because I think we have some bad cabling in our network or sometimes data gets corrupted when it is compressed and uncompressed.
Anyway, I have this program that takes the bad characters [CHR(0)] out. Here is the code:
*** This program goes through every field of every record in a table and removes CHR(0)
*** This stupid character screws up copying and appending records.
nCorrect = 0
nCheck = 0
USE GETFILE() IN 1
SELECT 1
COPY STRUCTURE EXTENDED TO temp
USE temp IN 2
SELECT 1
SCAN && Go through each record of the file being cleaned
SCATTER TO aRecord MEMO && Copy current record to an array
SELECT 2
FOR nField = 1 TO RECCOUNT() && Go through each element of the array
SELECT 2
GO (nField)
IF field_type = 'M' OR field_type = 'C' THEN && Only cleans memo or character fields
SELECT 1
IF CHR(0)$aRecord(nField) = .T. THEN && This element needs to be cleaned
nCharacter = 1
DO WHILE nCharacter <= LEN(aRecord(nField)) && Go through each character in the element
IF SUBSTR(aRecord(nField),nCharacter,1) = CHR(0) THEN
aRecord(nField) = LEFT(aRecord(nField),nCharacter-1) + ;
IIF(LEN(aRecord(nField))=nCharacter,'',SUBSTR(aRecord(nField),nCharacter+1)) && This line takes out the CHR(0)
nCharacter = nCharacter - 1
nCorrect = nCorrect + 1
ENDIF
nCharacter = nCharacter + 1 && Move to next character
ENDDO
ENDIF
ENDIF
ENDFOR
SELECT 1
GATHER FROM aRecord MEMO && Replace record from array with each field cleaned
@ 1,1 SAY ALLTRIM(STR(RECNO()/RECCOUNT()*100,7,2)) + '% complete.'
@ 2,1 SAY ALLTRIM(STR(nCorrect,10)) + ' corrections.'
ENDSCAN