LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2003, 02:24 PM   #1
Thinkgeekness
Member
 
Registered: Nov 2002
Posts: 81

Rep: Reputation: 15
Deleting non ASCII characters


Hey, I have some non ASCII characters in my script which is causing my Apache server not able to run the script. My question is, how would I take out the non ASCII characters? I am going from a Windows box to a RHL box, and I tried uploading the file in ASCII mode but it didn't work. I really don't want to have to re-write the script.

Thanks

Edit: hopefully this is in the right forum topic, if not, sorry.
 
Old 02-28-2003, 02:52 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
^M?

What kind of non ascii characters are you seeing? Try transfering the file over as binary.

Now do you see ^M at the end of each line? DOS text and unix EOL characters are different. DOS uses both a line feed and a carriage return but unix only uses a lf.

There probably is a program called dos2unix on your linux box. If not you can find it on the web.




Last edited by michaelk; 02-28-2003 at 03:15 PM.
 
Old 02-28-2003, 03:38 PM   #3
Thinkgeekness
Member
 
Registered: Nov 2002
Posts: 81

Original Poster
Rep: Reputation: 15
It looks like I am not seeing any non ASCII characters. Okay, let me explain what has happened:

I have been getting a 500 error with Apache and the reason for that was the script... I found a script on the Internet and directly copied and pasted it into Kate and it worked. So I assumed that it was non ASCII characters that was causing the problem... Well, that doesnt look right. I looked opened the script in Kedit and I didnt see any characters that shouldnt be in it. I ran the script from the terminal, and it worked. Do you have any suggestions for what I should do?

Thanks
 
Old 03-04-2003, 03:04 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Can you post the script?
 
Old 03-04-2003, 01:29 PM   #5
Thinkgeekness
Member
 
Registered: Nov 2002
Posts: 81

Original Poster
Rep: Reputation: 15
It works now... It was the way that I had the script layed out. Thanks for your help anyways.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert characters by ascii code? J_Szucs Linux - General 14 06-17-2017 12:33 PM
mouse keys and non-ascii characters elyk Slackware 8 12-02-2005 12:46 PM
typing high-ascii characters gerrym Linux - Newbie 1 08-12-2004 12:38 AM
Extended ASCII characters in UNIX MatSzor Programming 5 05-15-2004 09:57 PM
ascii characters lakshman Linux - General 1 03-14-2003 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration