>>Hi All:
>>
>>I want to check fields in a table for illegal characters and replace them with '*'. This is because I'm running a program that converts table data to XML and the program chokes on illegal characters.
>>
>>Is there a way to say something like this:
>>
>>
>>replace all cField with STRTRAN(cField, IllegalCharacter, '*')
>>
>>
>>Thanks,
>>
>>Yossi
>
>Yes, use CHRTRAN instead.
If I understand this correctly, I would have to build a string of illegal characters first. Something like:
lcNotLegal = chr(1) + chr(2) + chr(3) + .........
lcReplacement = replicate('*', len(lcNotLegal))
replace all cField with CHRTRAN(cField, lcNotLegal, lcReplacement)