RE:FIXED - special characters messing me up
On Tue, 13 Feb 2001, John W Ford wrote: Thanks everybody for helping me out... I got the scripts loaded and am talking to mySQL via DBI now. Good John, Which method did you use? Please let us know so we can add it to our list of fixes ... Regards Peter [EMAIL PROTECTED] -- It is as sport to a fool to do mischief: but a man of understanding hath wisdom. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
Rolf Hopkins schrieb: "^M"??? You sure it is that? Anyway, it is most likely to do with carriage returns. Windows uses CR and LF to indicate a new line, while Linux and Macs only use LF. Hopefully this will help. Don't know what you can do about it though. - Original Message - From: "John W Ford" [EMAIL PROTECTED] To: "Mysql" [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 15:04 Subject: special characters messing me up I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford this is a very old well-known Windows issue; you should use a text editor what can save your files in UNIX format: I guess every professinal editor has this option, see Textpad or Dreamweaver... -- http://it97.dyn.dhs.org/ IrmundThum +49 179 6998564 +49 6374 992541 Kryptographische Unterschrift mit S/MIME
Re: special characters messing me up
On Tue, 13 Feb 2001, Irmund Thum wrote: Rolf Hopkins schrieb: "^M"??? You sure it is that? Anyway, it is most likely to do with carriage returns. Windows uses CR and LF to indicate a new line, while Linux and Macs only use LF. Hopefully this will help. Don't know what you can do about it though. this is a very old well-known Windows issue; you should use a text editor what can save your files in UNIX format: I guess every professinal editor has this option, see Textpad or Dreamweaver... Or if you ftp it to your server, you can set your ftp client to strip the newline chars. -- /"\ \ /ASCII RIBBON CAMPAIGN X AGAINST HTML EMAIL / \AND POSTINGS
Re: special characters messing me up
can you please stop sending attachments through the list? At 11:24 AM +0100 2/13/01, Irmund Thum wrote: Rolf Hopkins schrieb: "^M"??? You sure it is that? Anyway, it is most likely to do with carriage returns. Windows uses CR and LF to indicate a new line, while Linux and Macs only use LF. Hopefully this will help. Don't know what you can do about it though. - Original Message - From: "John W Ford" [EMAIL PROTECTED] To: "Mysql" [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 15:04 Subject: special characters messing me up I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford this is a very old well-known Windows issue; you should use a text editor what can save your files in UNIX format: I guess every professinal editor has this option, see Textpad or Dreamweaver... -- http://it97.dyn.dhs.org/ IrmundThum +49 179 6998564 +49 6374 992541 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Description: Kryptographische Unterschrift mit S/MIME Attachment converted: Ionia:smime.p7s (/) (00013E6A) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
When ftp'ing the file use the ASCII mode instead of the BINARY mode. All CR/LF conversions will take place automagically. Alternatively some linux distributions have a utility to strip CR's from ASCII files and there is always old reliable vi . I hope this helps... Pat... [EMAIL PROTECTED] - Original Message - From: [EMAIL PROTECTED] To: "Irmund Thum" [EMAIL PROTECTED] Cc: "Mysql" [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 7:31 AM Subject: Re: special characters messing me up - Original Message - From: "John W Ford" [EMAIL PROTECTED] To: "Mysql" [EMAIL PROTECTED] Sent: Tuesday, February 13, 2001 15:04 Subject: special characters messing me up I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford this is a very old well-known Windows issue; you should use a text editor what can save your files in UNIX format: I guess every professinal editor has this option, see Textpad or Dreamweaver... -- http://it97.dyn.dhs.org/ IrmundThum +49 179 6998564 +49 6374 992541 Content-Type: application/x-pkcs7-signature; name="smime.p7s" Content-Disposition: attachment; filename="smime.p7s" Content-Description: Kryptographische Unterschrift mit S/MIME Attachment converted: Ionia:smime.p7s (/) (00013E6A) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
At 23:04 12-02-2001 -0800, John W Ford wrote: I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. That's a carriage return. DOS/Windows ends a line with a carriage return followed by a line feed. Unix ends a line with a line feed only. You can easily convert between DOS/Windows and Unix files using "tuc" which you can find in the /unix/tuc/ directory of ftp://ftp.int80h.org . Just download tuc.exe for Windows, or the .tar.gz file for Unix. Adam --- Whiz Kid Technomagic - brand name computers for less. See http://www.whizkidtech.net/pcwarehouse/ for details. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
On Tue, 13 Feb 2001, Peter Skipworth wrote: Or a handy one-liner... perl -pi -e "s/[\012\015]//" *.sql Or alternatively edit the file with vi and do: :s/ // This inteprets to the following keystrokes: ':' colon 's' s for substitute ' ' Ctrl-v-m to create the annoying ^M as one character '//'two slashes regards, thalis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
On Tue, 13 Feb 2001, Irmund Thum wrote: Rolf Hopkins schrieb: "^M"??? The ^M is the carriage return/line feed usually found in ms/dos text files. On my Linux system (on downloaded files) I removed them by tr -d \r old file new file. tr = text replace; -d delete; \r = ^M see 'info tr' There is also another way of getting ^M but I have forgotten. Regards Peter [EMAIL PROTECTED] -- The thoughts of the righteous are right: but the counsels of the wicked are deceit. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: special characters messing me up
Or a handy one-liner... perl -pi -e "s/[\012\015]//" *.sql Or alternatively edit the file with vi and do: :s/// This inteprets to the following keystrokes: ':' colon 's' s for substitute ''Ctrl-v-m to create the annoying ^M as one character '//' two slashes Xmmm, seems the listd didn't like my '^M' :-( My mistake. REPEAT: In vi you type: :s/^M// This inteprets to the following keystrokes: ':' colon 's' s for substitute '^M'Ctrl-v-m to create the annoying ^M as one character (the CR) '//'two slashes regards, thalis - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: special characters messing me up
Try this, The code below will remove the last character from each record in your file. On your Linux system enter this line on the command line and the results will appear in the NEW_FILE. Obviously you can name the input and output files anything you want. awk '{print substr($0, 1, length-1)}' YOUR_FILE NEW_FILE Note that 'one-liner' script will remove the last char from each record whether it is a ^M or not, so don't use it on all your files. Michael Thomas www.abcXyz.com -Original Message- From: John W Ford [mailto:[EMAIL PROTECTED]] Sent: Monday, February 12, 2001 11:04 PM To: Mysql Subject: special characters messing me up I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: special characters messing me up
John Here is another solution to removing those '^M' chars. This is a lot simpler than my last idea :- sed 's/^M//g' YOUR_FILE YOUR_NEW_FILE Michael Thomas www.abcXyz.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] ysql.com Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: special characters messing me up
mv file file~ ; tr -d '\015' file~ file ; rm file~ Or, in vim, :set fileformat=unix Or, use PFE32.EXE on Windows as your editor (allows saving as Unix text file). -Tilghman -- "There cannot be a crisis today. My schedule is already full." --Henry Kissinger -Original Message- From: John W Ford [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 13, 2001 01:04 I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: special characters messing me up
Thanks everybody for helping me out... I got the scripts loaded and am talking to mySQL via DBI now. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of G. Adam Stanislav Sent: Tuesday, February 13, 2001 6:36 AM To: John W Ford; Mysql Subject: Re: special characters messing me up At 23:04 12-02-2001 -0800, John W Ford wrote: I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. That's a carriage return. DOS/Windows ends a line with a carriage return followed by a line feed. Unix ends a line with a line feed only. You can easily convert between DOS/Windows and Unix files using "tuc" which you can find in the /unix/tuc/ directory of ftp://ftp.int80h.org . Just download tuc.exe for Windows, or the .tar.gz file for Unix. Adam --- Whiz Kid Technomagic - brand name computers for less. See http://www.whizkidtech.net/pcwarehouse/ for details. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
special characters messing me up
I can't figure out why my windows machine leaves "^M" character at the end of each line of code. This causes the file to be messed up when I put it on the Linux server. It makes my perl interpreter look for a file named ^M after the very first line. #!/usr/sbin/perl also... what else I can't figure out is why this special character is sometimes hidden and sometimes visible in my Emacs program in Linux... this is the program I used in which I found the problem. anybody know? John Ford