treating special chars

Hi,

I need some advise on treating non printable chars over ascii value 126

Case 1 :
On some fields in the text , I need to retiain then 'as-is' and load to a database.I understand it also depends on database codepage.
but i just wanna know how do i ensure it do not change while loading on assumption database codepage is set properly.

Case 2;
I wanna omit special chards on some fields for an instance

cat myfile returns Blatn
and 
cat -vet myfile returns 
BlatnM- 

So how do I ensure I load only Blatn after omitting the special character.

I understand, both the cases are contradictory, but it's as good as my requirement :wink:

Thanks
Brian

tr -dc '[:print:]'  < file > newfile

strips out any non-printable character in your current locale's charmap. newfile will have zero unprintable characters in it, in other words.

Is that what you want? See your man page for tr -- POSIX character classes may require double brackets -- e.g., '[[:print:]]' on your box