Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chr(127)

Status
Not open for further replies.

matrixindicator

IS-IT--Management
Sep 6, 2007
418
BE
Hey,

I do an import of a .dbf file. This is a neat file but a little contamination can occur.
I am familiar with Chr() use to replace some unwanted chararters. The case is, visually in my text I see a little square like in Chr(127) in the ANSI table. I tried Chr(129), Chr(157), Chr(144), Chr(143), Chr(141). But none of them recognize this sign and erase this. My code is tested with other signs that he recognize and repclace.

Code:
SANGESA

my second question is, when he dedect this sign how to say, replace with nothing, because the sign is in the word.
 
In my experience those squares are frequently carriage returns so you may want to try chr(13)
 
Then you should probably check what value the unwanted character is with something like the Asc() function.
 
Asc(mid("SANGESA" ,5,1))

return 1

replace("SANGESA",chr(1),"")

returns SANGESA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top