problem cgi

Discussion in 'Perl Misc' started by john.swilting, Mar 10, 2007.

  1. I continue my order for the site of sale of paintings for my friend
    I already posted several questions about the cgi one has to bring aide.i to
    me seeks to apply the councils that one me a gives
    I do not post the totality of the script.I post only what does not go
    I obtain the following error
    Unrecognized character \xC2 at /var/www/cgi-bin/vente0.02.cgi line 15.

    my code:
    #!/usr/bin/perl -w
    use diagnostics;
    use strict;
    use CGI qw:)standard escapeHTML);
    use CGI::Carp qw(fatalsToBrowser);

    my %params;
    my $cgi;

    $cgi = new CGI;
    %params = $cgi->Vars;

    print header,start_html('Commande'),h1('Bon de Commande'),start_form;

         for my $key (sort keys %params) {
           print "The value for $key is '$params{$key}'\n",br;
    ##it is in thispart there that there is the problem but I cannot find it
         }

    print submit,end_form,end_html;
     
    john.swilting, Mar 10, 2007
    #1
    1. Advertising

  2. john.swilting

    Guest Guest

    I recopied the pod and I think that my loop for on the hash functions
    "john.swilting" <> a écrit dans le message de news:
    45f2872a$0$5083$...
    >I continue my order for the site of sale of paintings for my friend
    > I already posted several questions about the cgi one has to bring aide.i
    > to
    > me seeks to apply the councils that one me a gives
    > I do not post the totality of the script.I post only what does not go
    > I obtain the following error
    > Unrecognized character \xC2 at /var/www/cgi-bin/vente0.02.cgi line 15.
    >
    > my code:
    > #!/usr/bin/perl -w
    > use diagnostics;
    > use strict;
    > use CGI qw:)standard escapeHTML);
    > use CGI::Carp qw(fatalsToBrowser);
    >
    > my %params;
    > my $cgi;
    >
    > $cgi = new CGI;
    > %params = $cgi->Vars;
    >
    > print header,start_html('Commande'),h1('Bon de Commande'),start_form;
    >
    > for my $key (sort keys %params) {
    > print "The value for $key is '$params{$key}'\n",br;
    > ##it is in thispart there that there is the problem but I cannot find it
    > }
    >
    > print submit,end_form,end_html;
    >
     
    Guest, Mar 10, 2007
    #2
    1. Advertising

  3. john.swilting wrote:
    > I continue my order for the site of sale of paintings for my friend
    > I already posted several questions about the cgi one has to bring aide.i to
    > me seeks to apply the councils that one me a gives
    > I do not post the totality of the script.I post only what does not go
    > I obtain the following error
    > Unrecognized character \xC2 at /var/www/cgi-bin/vente0.02.cgi line 15.
    >
    > my code:
    > #!/usr/bin/perl -w
    > use diagnostics;
    > use strict;
    > use CGI qw:)standard escapeHTML);
    > use CGI::Carp qw(fatalsToBrowser);
    >
    > my %params;
    > my $cgi;
    >
    > $cgi = new CGI;
    > %params = $cgi->Vars;
    >
    > print header,start_html('Commande'),h1('Bon de Commande'),start_form;
    >
    > for my $key (sort keys %params) {
    > print "The value for $key is '$params{$key}'\n",br;


    I'd remove the ",br". It looks like a mistake to me.

    > ##it is in thispart there that there is the problem but I cannot find it
    > }
    >
    > print submit,end_form,end_html;
    >
     
    RedGrittyBrick, Mar 10, 2007
    #3
  4. RedGrittyBrick wrote:
    > john.swilting wrote:
    >> I continue my order for the site of sale of paintings for my friend
    >> I already posted several questions about the cgi one has to bring
    >> aide.i to
    >> me seeks to apply the councils that one me a gives
    >> I do not post the totality of the script.I post only what does not go
    >> I obtain the following error
    >> Unrecognized character \xC2 at /var/www/cgi-bin/vente0.02.cgi line 15.
    >>
    >> my code:
    >> #!/usr/bin/perl -w
    >> use diagnostics;
    >> use strict;
    >> use CGI qw:)standard escapeHTML);
    >> use CGI::Carp qw(fatalsToBrowser);
    >>
    >> my %params;
    >> my $cgi;
    >>
    >> $cgi = new CGI;
    >> %params = $cgi->Vars;
    >>
    >> print header,start_html('Commande'),h1('Bon de Commande'),start_form;
    >>
    >> for my $key (sort keys %params) {
    >> print "The value for $key is '$params{$key}'\n",br;

    >
    > I'd remove the ",br". It looks like a mistake to me.
    >
    >> ##it is in thispart there that there is the problem but I cannot find it
    >> }
    >>
    >> print submit,end_form,end_html;
    >>


    Oops, forget that, I missed the "use CGI".
     
    RedGrittyBrick, Mar 10, 2007
    #4
  5. john.swilting

    -berlin.de Guest

    john.swilting <> wrote in comp.lang.perl.misc:
    > I continue my order for the site of sale of paintings for my friend
    > I already posted several questions about the cgi one has to bring aide.i to
    > me seeks to apply the councils that one me a gives


    Your postings are hard to follow. I suppose they are babelfish
    translations from French. That is insufficient, you can't communicate
    about technical problems that way. I suppose that is why you postings
    hardly receive an echo. Maybe fr.comp.lang.perl is worth a try?

    > I do not post the totality of the script.I post only what does not go
    > I obtain the following error
    > Unrecognized character \xC2 at /var/www/cgi-bin/vente0.02.cgi line 15.
    >
    > my code:
    > #!/usr/bin/perl -w
    > use diagnostics;
    > use strict;
    > use CGI qw:)standard escapeHTML);
    > use CGI::Carp qw(fatalsToBrowser);
    >
    > my %params;
    > my $cgi;
    >
    > $cgi = new CGI;
    > %params = $cgi->Vars;
    >
    > print header,start_html('Commande'),h1('Bon de Commande'),start_form;


    The next two line start with non-printable characters...

    >      for my $key (sort keys %params) {
    >        print "The value for $key is '$params{$key}'\n",br;
    > ##it is in thispart there that there is the problem but I cannot find it


    ....as does the next one.

    >      }
    >
    > print submit,end_form,end_html;


    The indicated lines in your code contain characters at their beginning
    that don't belong there. Whatever they are in your original source,
    try to delete them.

    Anno
     
    -berlin.de, Mar 10, 2007
    #5
  6. A. Sinan Unur wrote:

    > -berlin.de wrote in
    > news::
    >
    > Well, it is worth checking out his adventures there, if only for a
    > chuckle.
    >
    >

    http://groups.google.com/group/fr.comp.lang.perl/msg/dad78040e17b16c7?dmode=source
    >
    > Sinan
    >

    good, I succeeded in making it however function you did not help me much
    after I have an e-mail form which functions and I should take time to check
    well the entries of the form of order
    I progress live peace and happiness
    my code:
    #!/usr/bin/perl -w
    use diagnostics;
    use strict;
    use CGI qw:)standard escapeHTML);
    use CGI::Carp qw(fatalsToBrowser);

    my %params;
    my $cgi;
    my $key;
    my $image;
    my $action;
    $cgi = new CGI;
    %params = $cgi->Vars;
    for $key(sort keys %params){
    $image = $key;
    $action = $params{$key};
    }
    print header,start_html('Commande'),h1('Bon de
    Commande'),start_form,p("value formulaire",tt(escapeHTML($image))),p("value
    param",tt(escapeHTML($action))),submit,end_form,end_html;
     
    john.swilting, Mar 11, 2007
    #6
  7. john.swilting

    Guest Guest

    I am not very strong in perl.I become stronger in perl.I understand than all
    the questions cannot be milked but to give the bond of one of my posts on
    fr.comp.lang.perl they are not sympathetic it does not answer me .Fr, there
    is no activiter and the majoriter questions are very simple example I never
    see Canadian on the news Fr on bzflag there are Canadian
    "john.swilting" <> a écrit dans le message de news:
    45f3d8d5$0$5105$...
    > A. Sinan Unur wrote:
    >
    >> -berlin.de wrote in
    >> news::
    >>
    >> Well, it is worth checking out his adventures there, if only for a
    >> chuckle.
    >>
    >>

    > http://groups.google.com/group/fr.comp.lang.perl/msg/dad78040e17b16c7?dmode=source
    >>
    >> Sinan
    >>

    > good, I succeeded in making it however function you did not help me much
    > after I have an e-mail form which functions and I should take time to
    > check
    > well the entries of the form of order
    > I progress live peace and happiness
    > my code:
    > #!/usr/bin/perl -w
    > use diagnostics;
    > use strict;
    > use CGI qw:)standard escapeHTML);
    > use CGI::Carp qw(fatalsToBrowser);
    >
    > my %params;
    > my $cgi;
    > my $key;
    > my $image;
    > my $action;
    > $cgi = new CGI;
    > %params = $cgi->Vars;
    > for $key(sort keys %params){
    > $image = $key;
    > $action = $params{$key};
    > }
    > print header,start_html('Commande'),h1('Bon de
    > Commande'),start_form,p("value
    > formulaire",tt(escapeHTML($image))),p("value
    > param",tt(escapeHTML($action))),submit,end_form,end_html;
     
    Guest, Mar 11, 2007
    #7
  8. john.swilting

    Guest Guest

    you signed the petition anti drm
    http://www.defectivebydesign.org/
    "A. Sinan Unur" <> a écrit dans le message de news:
    Xns98EFB4E0FCCF3asu1cornelledu@127.0.0.1...
    > -berlin.de wrote in
    > news::
    >
    >> john.swilting <> wrote in comp.lang.perl.misc:

    > Well, it is worth checking out his adventures there, if only for a
    > chuckle.
    >
    >
    > Sinan
    >
    > --
    > A. Sinan Unur <>
    > (remove .invalid and reverse each component for email address)
    >
    > comp.lang.perl.misc guidelines on the WWW:
    > http://augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
    >
     
    Guest, Mar 11, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,623
    Jürgen Exner
    Jul 31, 2003
  2. Shailan
    Replies:
    2
    Views:
    1,163
    Shailan
    Dec 15, 2003
  3. John Smith
    Replies:
    0
    Views:
    3,247
    John Smith
    May 15, 2006
  4. Luigi Ma
    Replies:
    0
    Views:
    172
    Luigi Ma
    Nov 21, 2007
  5. BestFriend
    Replies:
    2
    Views:
    920
Loading...

Share This Page