Re: [WebDNA] [convertchars] and ascii problem
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 104741
interpreted = N
texte = 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 : éàï or
> Because then [MOVEFILE] won't process, so neither Imagemagik...> > So I created a database to convert chars> à=a; ï=i; é=e> but when I apply the ascii convert I get very strange character back > like : i�i�i�i�> 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=[ConvertChars db=^ascii.db][Nom_regate][/ConvertChars]> but instead of ïôéà I have in the db:i�i�i�i� 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> Lawrencewhat about simply something like:[grep search=[^A-Za-z_-]&replace=][fnames][/grep]For cleaning your input.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Associated Messages, from the most recent to the oldest:
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 : éàï or > Because then [movefile] won't process, so neither Imagemagik...> > So I created a database to convert chars> à=a; ï=i; é=e> but when I apply the ascii convert I get very strange character back > like : i�i�i�i�> 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=[ConvertChars db=^ascii.db][Nom_regate][/ConvertChars]> but instead of ïôéà I have in the db:i�i�i�i� 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> Lawrencewhat about simply something like:[grep search=[^A-Za-z_-]&replace=][fnames][/grep]For cleaning your input.Donovan-- Donovan BrookeEuca Design Center[Practical-Ethical-Efficient]www.euca.usegg.bzartglass-forum.com
Donovan Brooke
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:
calculating tax rates, mail order solutions and version 2 (1997)
Possible Bug in 2.0b15.acgi (1997)
includes (2003)
catching WebDNA error messages (2003)
I read the manual (2000)
Web Catalog vs. ICAT (1997)
Shipping [grandtotal] solution (1997)
Help name our technology! (1997)
Serving images from databases (1998)
Email within tmpl ? (1997)
Include a big block of text (1997)
WebCat2 - storing unformatted date data? (1997)
Re:redirect from the errorsMessages.db entry (1997)
Garbage display after 100 records (was WebCatalog usage) (1997)
changing banners on a page without refresh? (2000)
Emailer setup (1997)
email code (1998)
Cart problem (1999)
[checkboxes] and webcat (2) (2000)
Username for Admin Group (1997)