Re: [WebDNA] Major grep/convertchars linux issues when writing to db

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105952
interpreted = N
texte = --Apple-Mail-2-256432567 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Try ConvertWORDS rather than ConvertCHARS Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 17/11/2010, at 8:13 AM, Diane Blackmore (Cohesion) wrote: > Hi >=20 > I=92ve gone back through the list history on this and tried all the = fixes but this one=92s stumping me. >=20 > I=92m getting bad characters when writing to database (replace), in = the form of %0B and %1D. [Content] field is from a textarea (with = Innova 4.2 RTE) within a form post with enctype multipart/form-data =96 = which it needs to be for pic uploading purposes. Oddly it=92s also = adding in heaps of spaces as well although I=92ve no idea where these = are coming from as they=92re not in the RTE. >=20 > I have tried =96 with no success =96 the following; >=20 > 1/ Grep=92s; >=20 >> [grep search=3D%0B|%1D&replace=3D][content][/grep] >> [grep search=3D[%0B]|[%1D]&replace=3D][content][/grep] >>=20 >> Have also tried grep=92ing the content prior to writing it in an = effort to clean it before it tries to write but no difference. Have also = tried grep=92ing justs the %1D by itself, again with no success. Have = tried with [url] tags around the [content] but no difference either. >>=20 >> Since there=92s a thread about Linux servers & not using grep I then = went to convertchars as follows; >=20 > 2/ Convertchars >=20 >> [table name=3Dconvert&fields=3Dfrom,to] >> %0A =20 >> %0B =20 >> %0D =20 >> %1D =20 >> [/table] >> (Format of table is =93value=94,tab,=94=94) >>=20 >> [convertchars table=3Dconvert][content][/convertchars] >>=20 >> This works for the %0B but not the %1D. I=92ve tried moving the %1D = record to the first line in the table but that didn=92t make a = difference either. >> Have also tried with [url] tags around the [content] but this makes = the problem worse. >=20 >=20 > Server setup is Apache/2.2.15 (Unix) on Linux www2 2.6.28-19-server = #66-Ubuntu with WebDNA version 6.2 (unix-Linux Intel Apache Module = version 6.2).=20 >=20 > I note that the save state of the database is also changed from = Unix(LF) to ClassicMac(CR) after the db write =96 for no reason = whatsoever. And its doing it with grep and convertchars. It doesn=92t = change the save state if its set to Windows(CRLF).=20 >=20 > All help is of course, gratefully appreciated. >=20 >=20 > Thanks, >=20 >=20 > --Apple-Mail-2-256432567 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Try = ConvertWORDS rather than ConvertCHARS


Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 17/11/2010, at 8:13 AM, Diane Blackmore (Cohesion) = wrote:

Hi

I=92ve gone back through the list history on this and tried all the = fixes but this one=92s stumping me.

I=92m getting bad characters when writing to database (replace), in the = form of %0B and %1D.  [Content] field is from a textarea (with = Innova 4.2 RTE) within a form post with enctype multipart/form-data =96 = which it needs to be for pic uploading purposes. Oddly it=92s also = adding in heaps of spaces as well although I=92ve no idea where these = are coming from as they=92re not in the RTE.

I have tried =96 with no success =96 the following;

1/ Grep=92s;

[grep = search=3D%0B|%1D&replace=3D][content][/grep]
[grep search=3D[%0B]|[%1D]&replace=3D][content][/grep]

Have also tried grep=92ing the content prior to writing it in an effort = to clean it before it tries to write but no difference. Have also tried = grep=92ing justs the %1D by itself, again with no success. Have tried = with [url] tags around the [content] but no difference either.

Since there=92s a thread about Linux servers & not using grep I then = went to convertchars as follows;

2/ Convertchars

[table = name=3Dconvert&fields=3Dfrom,to]
%0A     
%0B     
%0D     
%1D     
[/table]
(Format of table is =93value=94,tab,=94=94)

[convertchars table=3Dconvert][content][/convertchars]

This works for the %0B but not the %1D. I=92ve tried moving the %1D = record to the first line in the table but that didn=92t make a = difference either.
Have also tried with [url] tags around the [content] but this makes the = problem worse.


Server setup is Apache/2.2.15 (Unix) on Linux www2 2.6.28-19-server = #66-Ubuntu with WebDNA version 6.2 (
unix-Linux Intel Apache Module version = 6.2).

I note that the save state of the database is also changed from Unix(LF) = to ClassicMac(CR) after the db write =96 for no reason whatsoever. And = its doing it with grep and convertchars. It doesn=92t change the save = state if its set to Windows(CRLF).

All help is of course, gratefully appreciated.


Thanks,


<image.gif>


= --Apple-Mail-2-256432567-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Major grep/convertchars linux issues when writing to db (Tom Duke 2010)
  2. Re: [WebDNA] Major grep/convertchars linux issues when writing to db ("Diane Blackmore (Cohesion)" 2010)
  3. Re: [WebDNA] Major grep/convertchars linux issues when writing to db (Tom Duke 2010)
  4. Re: [WebDNA] Major grep/convertchars linux issues when writing to db ("Diane Blackmore (Cohesion)" 2010)
  5. Re: [WebDNA] Major grep/convertchars linux issues when writing to db (Tom Duke 2010)
  6. Re: [WebDNA] Major grep/convertchars linux issues when writing to db ("Diane Blackmore (Cohesion)" 2010)
  7. Re: [WebDNA] Major grep/convertchars linux issues when writing to db (Stuart Tremain 2010)
  8. [WebDNA] Major grep/convertchars linux issues when writing to db ("Diane Blackmore (Cohesion)" 2010)
--Apple-Mail-2-256432567 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 Try ConvertWORDS rather than ConvertCHARS Regards Stuart Tremain IDFK Web Developments AUSTRALIA webdna@idfk.com.au On 17/11/2010, at 8:13 AM, Diane Blackmore (Cohesion) wrote: > Hi >=20 > I=92ve gone back through the list history on this and tried all the = fixes but this one=92s stumping me. >=20 > I=92m getting bad characters when writing to database (replace), in = the form of %0B and %1D. [Content] field is from a textarea (with = Innova 4.2 RTE) within a form post with enctype multipart/form-data =96 = which it needs to be for pic uploading purposes. Oddly it=92s also = adding in heaps of spaces as well although I=92ve no idea where these = are coming from as they=92re not in the RTE. >=20 > I have tried =96 with no success =96 the following; >=20 > 1/ Grep=92s; >=20 >> [grep search=3D%0B|%1D&replace=3D][content][/grep] >> [grep search=3D[%0B]|[%1D]&replace=3D][content][/grep] >>=20 >> Have also tried grep=92ing the content prior to writing it in an = effort to clean it before it tries to write but no difference. Have also = tried grep=92ing justs the %1D by itself, again with no success. Have = tried with [url] tags around the [content] but no difference either. >>=20 >> Since there=92s a thread about Linux servers & not using grep I then = went to convertchars as follows; >=20 > 2/ Convertchars >=20 >> [table name=3Dconvert&fields=3Dfrom,to] >> %0A =20 >> %0B =20 >> %0D =20 >> %1D =20 >> [/table] >> (Format of table is =93value=94,tab,=94=94) >>=20 >> [convertchars table=3Dconvert][content][/convertchars] >>=20 >> This works for the %0B but not the %1D. I=92ve tried moving the %1D = record to the first line in the table but that didn=92t make a = difference either. >> Have also tried with [url] tags around the [content] but this makes = the problem worse. >=20 >=20 > Server setup is Apache/2.2.15 (Unix) on Linux www2 2.6.28-19-server = #66-Ubuntu with WebDNA version 6.2 (unix-Linux Intel Apache Module = version 6.2).=20 >=20 > I note that the save state of the database is also changed from = Unix(LF) to ClassicMac(CR) after the db write =96 for no reason = whatsoever. And its doing it with grep and convertchars. It doesn=92t = change the save state if its set to Windows(CRLF).=20 >=20 > All help is of course, gratefully appreciated. >=20 >=20 > Thanks, >=20 >=20 > --Apple-Mail-2-256432567 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 Try = ConvertWORDS rather than ConvertCHARS


Regards

Stuart = Tremain
IDFK Web Developments
AUSTRALIA




On 17/11/2010, at 8:13 AM, Diane Blackmore (Cohesion) = wrote:

Hi

I=92ve gone back through the list history on this and tried all the = fixes but this one=92s stumping me.

I=92m getting bad characters when writing to database (replace), in the = form of %0B and %1D.  [Content] field is from a textarea (with = Innova 4.2 RTE) within a form post with enctype multipart/form-data =96 = which it needs to be for pic uploading purposes. Oddly it=92s also = adding in heaps of spaces as well although I=92ve no idea where these = are coming from as they=92re not in the RTE.

I have tried =96 with no success =96 the following;

1/ Grep=92s;

[grep = search=3D%0B|%1D&replace=3D][content][/grep]
[grep search=3D[%0B]|[%1D]&replace=3D][content][/grep]

Have also tried grep=92ing the content prior to writing it in an effort = to clean it before it tries to write but no difference. Have also tried = grep=92ing justs the %1D by itself, again with no success. Have tried = with [url] tags around the [content] but no difference either.

Since there=92s a thread about Linux servers & not using grep I then = went to convertchars as follows;

2/ Convertchars

[table = name=3Dconvert&fields=3Dfrom,to]
%0A     
%0B     
%0D     
%1D     
[/table]
(Format of table is =93value=94,tab,=94=94)

[convertchars table=3Dconvert][content][/convertchars]

This works for the %0B but not the %1D. I=92ve tried moving the %1D = record to the first line in the table but that didn=92t make a = difference either.
Have also tried with [url] tags around the [content] but this makes the = problem worse.


Server setup is Apache/2.2.15 (Unix) on Linux www2 2.6.28-19-server = #66-Ubuntu with WebDNA version 6.2 (
unix-Linux Intel Apache Module version = 6.2).

I note that the save state of the database is also changed from Unix(LF) = to ClassicMac(CR) after the db write =96 for no reason whatsoever. And = its doing it with grep and convertchars. It doesn=92t change the save = state if its set to Windows(CRLF).

All help is of course, gratefully appreciated.


Thanks,


<image.gif>


= --Apple-Mail-2-256432567-- Stuart Tremain

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Fun with dates (1997) GIF Converter vs. Clip2Gif (2000) Searching a database... (2003) Replace context (1998) HEADER AND FOOTER (1997) Searching multiple fields (1997) File Upload (1997) Bad URL reference? (1997) Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997) Items XX to XX shown (1997) request for new command (1997) Upload and WebCat (1998) Sub Categories (2000) 2nd WebCatalog2 Feature Request (1996) [lookup] again... (2003) Multiple prices (1997) Setting up shop (1997) Here we go again...WebDNA - SQL- Clustering (2006) unsubscribe (1997) WebMerchant and MacAuthorize Errors (1998)