how to convert/delete characters from a text?
Posted: 2006-09-29 08:11:19
is there a way to remove (or substitute) some characters from a field text
in some collected fields i have to "fight" with some "chinese" characters.
Example: Does not have é—´é“ (taped)
I'ld like to leave only the "western" part of that text:
Does not have (taped)
logically the function should be:
Antoine may you help me to write it in a correct way, please?
thank you
ABN
in some collected fields i have to "fight" with some "chinese" characters.
Example: Does not have é—´é“ (taped)
I'ld like to leave only the "western" part of that text:
Does not have (taped)
logically the function should be:
Code: Select all
oldtxt:=getfield(fieldXYZ);
n:=1;
newtxt:='';
letter:='';
while n<=[i]length(oldtxt)[/i] do begin
letter:= [i]substring(oldtext,n,1)[/i] ;
//valid only between #32 to #165
if letter<' ' [i].or.[/i] letter > 'Ñ' then letter:='';
newtxt:=newtxt+letter;
end;
thank you
ABN