Re: [PHP] control-M

2005-05-05 Thread Petar Nedyalkov
On Thursday 05 May 2005 06:13, David Christensen wrote: I know I'm missing something, but I can't seem to find it or figure it out. I've done the google search, and I've done a quick scan of the list archives, but I can't seem to find the right way to remove control-M from a form submission

Re: [PHP] control-M

2005-05-05 Thread Joe Wollard
David, Well, I've never seen this issue on a form submission before, but I have seen it (and other oddities) when editing text files in vi that we created on M$. You might try something simple first such as: ?php $text = str_replace(^M\n\r, \n\r, $_POST['textarea_name']); ? I haven't tested

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
David Christensen wrote: I know I'm missing something, but I can't seem to find it or figure it out. I've done the google search, and I've done a quick scan of the list archives, but I can't seem to find the right way to remove control-M from a form submission page with textarea fields. I have a

Re: [PHP] control-M

2005-05-05 Thread David Christensen
Actually, I forgot to also mention that the browser is changing the control-M (^M) from the query when it sets the default value for the textarea to br /. I guess that is the HTML representation of the ^M. I'm currently using: $_POST[$field] = str_replace(\r\n, \n, $_POST[$field]);

Re: [PHP] control-M

2005-05-05 Thread David Christensen
These aren't text files, there form fields from a browser and fields from query. I don't think dos2unix will be of much help with this. Dave On Thu, 2005-05-05 at 09:07 +0300, Petar Nedyalkov wrote: On Thursday 05 May 2005 06:13, David Christensen wrote: I know I'm missing something, but I

Re: [PHP] control-M

2005-05-05 Thread David Christensen
Joe, not sure you str_replace will work. I think I need a way to represent the ^M with an ASCII code. The ^M character is a single character. If you type ^M that is 2 characters, caret + M. They are not equal ASCII-wise. Dave On Thu, 2005-05-05 at 03:11 -0400, Joe Wollard wrote: David,

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
David Christensen wrote: Actually, I forgot to also mention that the browser is changing the control-M (^M) from the query when it sets the default value for the textarea to br /. I guess that is the HTML representation of the ^M. you are using nl2br() on the input, that funcion adds 'br /'

Re: [PHP] control-M

2005-05-05 Thread David Christensen
I am? That news to me??? I just did a 'grep nl2br form.php' and I don't any output with nl2br. I'm not sure this is what's going on. I did see that function in the Strings section of the manual, but it didn't do anything for me. Thanks for your help, Dave On Thu, 2005-05-05 at 16:11 +0200,

Re: [PHP] control-M

2005-05-05 Thread Marek Kilimajer
David Christensen wrote: I am? That news to me??? I just did a 'grep nl2br form.php' and I don't any output with nl2br. I'm not sure this is what's going on. I did see that function in the Strings section of the manual, but it didn't do anything for me. Well, php isn't making it up, it has to

Re: [PHP] control-M

2005-05-05 Thread David Christensen
Oh, you just clued me in... I wonder if [EMAIL PROTECTED] might be able to shed some like on this. I'm using TBS as my template engine for this site. And yes, it does use nl2br in the meth_Html_Conv function. I'll probably need to add the htmlconv=no option to all of the textarea fields. I

[PHP] control-M

2005-05-04 Thread David Christensen
I know I'm missing something, but I can't seem to find it or figure it out. I've done the google search, and I've done a quick scan of the list archives, but I can't seem to find the right way to remove control-M from a form submission page with textarea fields. I have a series of textarea

[PHP] control M from export file

2003-09-29 Thread Ed Kwok
All: I am running into problem parsing a file exported from MS excel. I have exported the file as asci format, but there is a control M append to my document. What is this control M and how can I delete without manually replace it? Is there any automated function I could use? Thanks.

Re: [PHP] control M from export file

2003-09-29 Thread Chris Shiflett
--- Ed Kwok [EMAIL PROTECTED] wrote: I am running into problem parsing a file exported from MS excel. I have exported the file as asci format, but there is a control M append to my document. What is this control M and how can I delete without manually replace it? Is there any automated

Re: [PHP] control M from export file

2003-09-29 Thread Eugene Lee
On Sun, Sep 28, 2003 at 06:58:57PM -0700, Ed Kwok wrote: : :I am running into problem parsing a file exported from MS excel. I : have exported the file as asci format, but there is a control M : append to my document. What is this control M and how can I delete : without manually replace

Re: [PHP] control M from export file

2003-09-29 Thread Curt Zirzow
* Thus wrote Ed Kwok ([EMAIL PROTECTED]): All: I am running into problem parsing a file exported from MS excel. I have exported the file as asci format, but there is a control M append to my document. What is this control M and how can I delete without manually replace it? Is there