Re: [WebDNA] [convertchars] and ascii problem [solved]

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 104745
interpreted = N
texte = This is a multi-part message in MIME format. --------------040609020108020704000206 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, thanks for this answers. Tom's solution is the best, because it let the=20 user type the exact name (in this case it's a sailing race name) and I=20 need to keep all the non ASCII caracters. Using the convertwords let set=20 all the parameters to replace and not remove caracters Lawrence Le 15/02/10 20:08, Terry Wilson a =C3=A9crit : > I agree with this approach. On the form page, tell the user that the=20 > field must non-accented alphanumeric, and any other characters will be=20 > stripped out. Just like the thousands of username and password fields=20 > throughout the internet have certain restrictions. Leave it on the=20 > user to enter the info correctly. Then just run Donovan's grep routine=20 > to make sure it's clean. If you try to accommodate every possible=20 > character someone will throw at you, you'll surely miss something. > > Terry > > > On Mon, 15 Feb 2010 13:16:07 -0600 > Donovan Brooke wrote: > > Lawrence wrote: > >> hi, > >> here is my problem... > >> I need to create folders on the server using a name the > >>clients save > >> through a form. Then clients upload images, and the > >>Imagemagick make its > >> manipulations. (no problem yet) > >> My problem is if people use non ASCII caracters like : > >>=C3=A9=C3=A0=C3=AF or > >> Because then [MOVEFILE] won't process, so neither > >>Imagemagik... > >> > >> So I created a database to convert chars > >> =C3=A0=3Da; =C3=AF=3Di; =C3=A9=3De > >> but when I apply the ascii convert I get very strange > >>character back > >> like : i=EF=BF=BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD > >> I use UTF8 encoding in the pages and the same for the > >>database. > >> I tried to append the name of the folder in the db > >>replacing the non > >> ascii characters > >> ®ate_url=3D[ConvertChars > >>db=3D^ascii.db][Nom_regate][/ConvertChars] > >> but instead of =C3=AF=C3=B4=C3=A9=C3=A0 I have in the db:i=EF=BF=BDi= =EF=BF=BDi=EF=BF=BDi=EF=BF=BD and I > >>would like ioea... > >> > >> I found a solution using [grep] but it's not very clean, > >>and I need to > >> apply plenty of [grep] for each kind of character... > >> > >> As any body got an idea of what can be wrong or any > >>other solution... > >> Thanks > >> Lawrence > > > > what about simply something like: > > > > [grep search=3D[^A-Za-z_-]&replace=3D][fnames][/grep] > > > >For cleaning your input. > > Donovan > > > > -- > > Donovan Brooke > > Euca Design Center > > [Practical-Ethical-Efficient] > > www.euca.us > > egg.bz > > artglass-forum.com > > --------------------------------------------------------- > > This message is sent to you because you are subscribed > >to > > the mailing list . > > To unsubscribe, E-mail to: > > archives: http://mail.webdna.us/list/talk@webdna.us > > old archives: http://dev.webdna.us/TalkListArchive/ > > Bug Reporting: > >http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288 > --------------040609020108020704000206 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,
thanks for this answers. Tom's solution is the best, because it let the user type the exact name (in this case it's a sailing race name) and I need to keep all the non ASCII caracters. Using the convertwords let set all the parameters to replace and not remove caracters

Lawrence

Le 15/02/10 20:08, Terry Wilson a =C3=A9crit=C2=A0:
I agree with this approach. On the form page, tell the user that the field must non-accented alphanumeric, and any other characters will be stripped out. Just like the thousands of username and password fields throughout the internet have certain restrictions. Leave it on the user to enter the info correctly. Then just run Donovan's grep routine to make sure it's clean. If you try to accommodate every possible character someone will throw at you, you'll surely miss something.

Terry


On Mon, 15 Feb 2010 13:16:07 -0600
Donovan Brooke <dbrooke@euca.us> wrote:
> Lawrence wrote:
>> hi,
>> here is my problem...
>> I need to create folders on the server using a name the
>>clients save
>> through a form. Then clients upload images, and the
>>Imagemagick make its
>> manipulations. (no problem yet)
>> My problem is if people use non ASCII caracters like :
>>=C3=A9=C3=A0=C3=AF or <spaces>
>> Because then [MOVEFILE] won't process, so neither
>>Imagemagik...
>>
>> So I created a database to convert chars
>> =C3=A0=3Da; =C3=AF=3Di; =C3=A9=3De
>> but when I apply the ascii convert I get very strange
>>character back
>> like : i=EF=BF=BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD
>> I use UTF8 encoding in the pages and the same for the
>>database.
>> I tried to append the name of the folder in the db
>>replacing the non
>> ascii characters
>> &regate_url=3D[ConvertChars
>>db=3D^ascii.db][Nom_regate][/ConvertChars]
>> but instead of =C3=AF=C3=B4=C3=A9=C3=A0 I have in the db:i=EF=BF= =BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD and I
>>would like ioea...
>>
>> I found a solution using [grep] but it's not very clean,
>>and I need to
>> apply plenty of [grep] for each kind of character...
>>
>> As any body got an idea of what can be wrong or any
>>other solution...
>> Thanks
>> Lawrence
>
> what about simply something like:
>
> [grep search=3D[^A-Za-z_-]&replace=3D][fnames][/grep]
>
>For cleaning your input.
> Donovan
>
> --
> Donovan Brooke
> Euca Design Center
> [Practical-Ethical-Efficient]
> ww= w.euca.us
> egg.bz
> artglass-forum.com
> ---------------------------------------------------------
> This message is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: &= lt;talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us=
> old archives: http://dev.webdna.us/TalkListArchive/
> Bug Reporting:
>http://forum.webdna.us/eucabb.= html?page=3Dtopics&category=3D288

=C2=A0

--------------040609020108020704000206-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] [convertchars] and ascii problem [solved] (Lawrence 2010)
This is a multi-part message in MIME format. --------------040609020108020704000206 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Hi, thanks for this answers. Tom's solution is the best, because it let the=20 user type the exact name (in this case it's a sailing race name) and I=20 need to keep all the non ASCII caracters. Using the convertwords let set=20 all the parameters to replace and not remove caracters Lawrence Le 15/02/10 20:08, Terry Wilson a =C3=A9crit : > I agree with this approach. On the form page, tell the user that the=20 > field must non-accented alphanumeric, and any other characters will be=20 > stripped out. Just like the thousands of username and password fields=20 > throughout the internet have certain restrictions. Leave it on the=20 > user to enter the info correctly. Then just run Donovan's grep routine=20 > to make sure it's clean. If you try to accommodate every possible=20 > character someone will throw at you, you'll surely miss something. > > Terry > > > On Mon, 15 Feb 2010 13:16:07 -0600 > Donovan Brooke wrote: > > Lawrence wrote: > >> hi, > >> here is my problem... > >> I need to create folders on the server using a name the > >>clients save > >> through a form. Then clients upload images, and the > >>Imagemagick make its > >> manipulations. (no problem yet) > >> My problem is if people use non ASCII caracters like : > >>=C3=A9=C3=A0=C3=AF or > >> Because then [movefile] won't process, so neither > >>Imagemagik... > >> > >> So I created a database to convert chars > >> =C3=A0=3Da; =C3=AF=3Di; =C3=A9=3De > >> but when I apply the ascii convert I get very strange > >>character back > >> like : i=EF=BF=BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD > >> I use UTF8 encoding in the pages and the same for the > >>database. > >> I tried to append the name of the folder in the db > >>replacing the non > >> ascii characters > >> ®ate_url=3D[ConvertChars > >>db=3D^ascii.db][Nom_regate][/ConvertChars] > >> but instead of =C3=AF=C3=B4=C3=A9=C3=A0 I have in the db:i=EF=BF=BDi= =EF=BF=BDi=EF=BF=BDi=EF=BF=BD and I > >>would like ioea... > >> > >> I found a solution using [grep] but it's not very clean, > >>and I need to > >> apply plenty of [grep] for each kind of character... > >> > >> As any body got an idea of what can be wrong or any > >>other solution... > >> Thanks > >> Lawrence > > > > what about simply something like: > > > > [grep search=3D[^A-Za-z_-]&replace=3D][fnames][/grep] > > > >For cleaning your input. > > Donovan > > > > -- > > Donovan Brooke > > Euca Design Center > > [Practical-Ethical-Efficient] > > www.euca.us > > egg.bz > > artglass-forum.com > > --------------------------------------------------------- > > This message is sent to you because you are subscribed > >to > > the mailing list . > > To unsubscribe, E-mail to: > > archives: http://mail.webdna.us/list/talk@webdna.us > > old archives: http://dev.webdna.us/TalkListArchive/ > > Bug Reporting: > >http://forum.webdna.us/eucabb.html?page=3Dtopics&category=3D288 > --------------040609020108020704000206 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,
thanks for this answers. Tom's solution is the best, because it let the user type the exact name (in this case it's a sailing race name) and I need to keep all the non ASCII caracters. Using the convertwords let set all the parameters to replace and not remove caracters

Lawrence

Le 15/02/10 20:08, Terry Wilson a =C3=A9crit=C2=A0:
I agree with this approach. On the form page, tell the user that the field must non-accented alphanumeric, and any other characters will be stripped out. Just like the thousands of username and password fields throughout the internet have certain restrictions. Leave it on the user to enter the info correctly. Then just run Donovan's grep routine to make sure it's clean. If you try to accommodate every possible character someone will throw at you, you'll surely miss something.

Terry


On Mon, 15 Feb 2010 13:16:07 -0600
Donovan Brooke <dbrooke@euca.us> wrote:
> Lawrence wrote:
>> hi,
>> here is my problem...
>> I need to create folders on the server using a name the
>>clients save
>> through a form. Then clients upload images, and the
>>Imagemagick make its
>> manipulations. (no problem yet)
>> My problem is if people use non ASCII caracters like :
>>=C3=A9=C3=A0=C3=AF or <spaces>
>> Because then [movefile] won't process, so neither
>>Imagemagik...
>>
>> So I created a database to convert chars
>> =C3=A0=3Da; =C3=AF=3Di; =C3=A9=3De
>> but when I apply the ascii convert I get very strange
>>character back
>> like : i=EF=BF=BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD
>> I use UTF8 encoding in the pages and the same for the
>>database.
>> I tried to append the name of the folder in the db
>>replacing the non
>> ascii characters
>> &regate_url=3D[ConvertChars
>>db=3D^ascii.db][Nom_regate][/ConvertChars]
>> but instead of =C3=AF=C3=B4=C3=A9=C3=A0 I have in the db:i=EF=BF= =BDi=EF=BF=BDi=EF=BF=BDi=EF=BF=BD and I
>>would like ioea...
>>
>> I found a solution using [grep] but it's not very clean,
>>and I need to
>> apply plenty of [grep] for each kind of character...
>>
>> As any body got an idea of what can be wrong or any
>>other solution...
>> Thanks
>> Lawrence
>
> what about simply something like:
>
> [grep search=3D[^A-Za-z_-]&replace=3D][fnames][/grep]
>
>For cleaning your input.
> Donovan
>
> --
> Donovan Brooke
> Euca Design Center
> [Practical-Ethical-Efficient]
> ww= w.euca.us
> egg.bz
> artglass-forum.com
> ---------------------------------------------------------
> This message is sent to you because you are subscribed
>to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: &= lt;talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.us=
> old archives: http://dev.webdna.us/TalkListArchive/
> Bug Reporting:
>http://forum.webdna.us/eucabb.= html?page=3Dtopics&category=3D288

=C2=A0

--------------040609020108020704000206-- Lawrence

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:

Not really WebCat (1997) problems with 2 tags (1997) [UPPERCASE] (1997) TIP OF THE DAY (2004) Line items in table cells (1997) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) problems with dos and tracert + webDNA (1998) [WebDNA] Problem with SendMail - seems succesfull but nothing to recieve (2016) Bugs? What Bugs? was:Spawning Holdup? (2000) Encyption mail (1998) Unable to view next 101-200 (1997) Color options for items (1999) WC1.6 to WC2 date formatting (1997) Multiple Selections in Pull-Down Menu (2000) Frustration with formulas.db (1999) [TEXT SECURE=T] (2000) OT: ZIP & SIT files on OSX (2002) problems with 2 tags (1997) storebuilder problems on RedHat 6.1 with webcat 3.08 (2000) FW: Shipping calculations (1997)