• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 310
  • Last Modified:

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?
0
kennybud416
Asked:
kennybud416
  • 3
  • 3
1 Solution
 
ozoCommented:
what characters do you consider special?
and what characters do you consider closest?
0
 
kennybud416Author Commented:
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)?
0
 
ozoCommented:
tr(\x80-\xff)(letters of your choice to be a replacement)
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
kennybud416Author Commented:
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.
0
 
ozoCommented:
tr will work on win32 platforms
How do you transfer the files from windows to unix to lose the special characters?
0
 
kennybud416Author Commented:
I ftp (ascii). But when I open them up in Solaris 2.6 they are replaced with either nothing or some other weird character.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now