Link to home
Start Free TrialLog in
Avatar of kennybud416
kennybud416

asked on

Removing all special characters from an file

I would like to remove all the special characters from a file and replace it with the closest character possible.

Is there a script that I could use to do this?
Avatar of ozo
ozo
Flag of United States of America image

what characters do you consider special?
and what characters do you consider closest?
Avatar of kennybud416
kennybud416

ASKER

Any characters that unix can not interpt.

I.e. Dec value 128 to 225
     Hex value 80 to FF
     (both of the above are the same range).

Would it be possible to have a script which would ask me to enter in a letter of my choice to be a replacement (for the special character)?
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Right, but I need a perl script that will work on win32 platforms.  When I transfer the files from windows to unix the special characters are lost.  Thus having no special characters in unix.
tr will work on win32 platforms
How do you transfer the files from windows to unix to lose the special characters?
I ftp (ascii). But when I open them up in Solaris 2.6 they are replaced with either nothing or some other weird character.