Date: Fri, 01 Jan 1999 04:27:59 -0800 From: Jerry Preeper <preeper@cts.com> To: freebsd-questions@FreeBSD.ORG Subject: replace non-ascii characters Message-ID: <3.0.5.32.19990101042759.008a1a70@crash.cts.com>
next in thread | raw e-mail | index | archive | help
I know this isn't really a freebsd question, but I'm not sure where else to ask. I'm trying to write a small shell script that replaces non-ascii characters with the html equivalent in a file and just can't seem to figure how to identify the non-ascii characters. for example, I have written a small shell script that takes a file name as input to replace them using sed. Here is the script. #!/bin/sh for file in $* do sed -n "s/\\0x80/\Ç\;/g" ${file} sed -n "s/\\0x81/\ü\;/g" ${file} ..... bunches more done The problem is the search part isn't finding the special character. I have tried cutting and pasting the special character directly into the script as well, but it doesn't seem to work either. Does anyone have any ideas on how to accomplish. Thanks in advance. Jerry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.19990101042759.008a1a70>