Hi, much thanks for replying :)
I'll suggest you for the stylesheet thing soon, but i've passed the
afternoon trying to understand something :
I was experiencing a big mess while trying to receive form data with utf-8
Using CGI.pm Version 3.29
i had to do this Encode::encode("utf-8", param($key)) to get the received
fields correctly
and i said a big mess ! : i had really a strange behavior, after submiting 2
times a form with accentuated letters in a field, then every accentuated
letters in the body document went in who knows which encoding, when i don't
see the link beetween the form field itself and a h1 or p elsewhere.
moreover i didn't notice the existence of -override and you'll understand
that i didn't understand the strange symbols into textfields after the form
submission.
Then i read this
http://rt.cpan.org/Public/Bug/Display.html?id=19913
and decided to upgrade CGI.pm to Version 3.37 and use pragmas -nosticky and
-utf8, but !!!
-nosticky does nothing, i still need to do override=>1 for each field ...
and now, -utf8 pragma does exactly the problem of this morning !! well, only
for form fields this time :)
BUT if i don't use the -utf8 pragma with version 3.37, then i don't have any
utf-8 problem anymore
I won't complain because now the form works correctly with utf-8 ! But if i
did understand your discussion (english), it wasn't supposed to work without
-utf8 pragma, and this pragma wasn't suppose to introduce the problem that
it was aimed to resolv :)
So i just wanted to tell you all i did in case that it could help you
understanding better utf-8 problems.
If i had only one question : do i use correctly the -nosticky ?
Regards.
#!/usr/bin/perl
# my CGI.pm Version is 3.37
# wget
http://search.cpan.org/src/LDS/CGI.pm-3.37/CGI.pm
# cp CGI.pm /usr/share/perl/5.10/CGI.pm
#
http://rt.cpan.org/Public/Bug/Display.html?id=19913
# Uncomment this and load the form and submit :
# The ééé are converted into strange symbols
#use CGI qw(-utf8 :standard);
# Uncomment this and see that the behavior is unchanged
#use CGI qw(-nosticky :standard);
print header(-charset=>'utf-8'),
start_html(-encoding =>
'utf-8'),
$CGI::VERSION,
h1('Copy/paste and Submit!!'),
start_form,
textfield(-name=>'field', -value=>'ééé', -size=>50, -maxlength=>50),
# textfield(-override=>'1', -name=>'field', -value=>'ééé', -size=>50,
-maxlength=>50),
submit(),
end_form,
end_html,
;
On Fri, May 23, 2008 at 11:06 AM, Lincoln_D_Stein via RT <
bug-CGI.pm@rt.cpan.org> wrote:
Show quoted text>
> <URL:
http://rt.cpan.org/Ticket/Display.html?id=35354 >
>
> This will require a new API for setting the stylesheet so that both the
> header and the head are in sync. Can you suggest the call you would like
> to see?
>
> On Wed Apr 23 18:06:59 2008, glanchow wrote:
> > It may be discussed, i think that both <?xml and <link declaration are
> > necessary.
> > See javascript documentation about setActiveStyleSheet()
> >
> > <?xml version="1.0" encoding="utf-8"?>
> > <?xml-stylesheet type="text/css" href="mystyle.css"?>
> >
> > <link rel="stylesheet" type="text/css" href="styles/mystyle.css"
> > title="default"/>
>
>
>
>