red0hat has asked for the wisdom of the Perl Monks concerning the following question:
I've got a problem that is melting my brain a little.
I want to read something from a database, then post it in a HTML form. It worked fine until a user decided to throw in some accented characters. The accented characters are being posed to the website as 2 characters.
example: Château becomes Château.
The website uses iso-8859-15. So, I'm inclined to believe this is an encoding issue. The rest of the code is working as expected.
use WWW::Mechanize; my $mech = WWW::Mechanize->new(); $mech->agent_alias('Windows Mozilla'); $title ="Château"; $result = $mech->get($WineURL.$ID); die "GET failed\n" unless $result->is_success; $mech->field('frmFieldName[title]', $title); $result = $mech->submit; print $mech->value('frmFieldName[title]');
Output = Château
Thanks in advance,
ChrisP.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: www:mechanize mangles unicode
by ikegami (Patriarch) on Apr 28, 2010 at 22:14 UTC | |
by ikegami (Patriarch) on Apr 28, 2010 at 22:53 UTC | |
by red0hat (Initiate) on Apr 28, 2010 at 23:12 UTC | |
by ikegami (Patriarch) on Apr 28, 2010 at 23:17 UTC | |
by Desmond Walsh (Initiate) on Nov 27, 2015 at 00:10 UTC | |
by Desmond Walsh (Initiate) on Nov 27, 2015 at 21:20 UTC | |
by red0hat (Initiate) on Apr 28, 2010 at 22:57 UTC | |
|
Re: www:mechanize mangles unicode
by Corion (Patriarch) on Apr 28, 2010 at 20:52 UTC | |
by red0hat (Initiate) on Apr 28, 2010 at 21:07 UTC | |
by Corion (Patriarch) on Apr 28, 2010 at 21:10 UTC | |
by Hue-Bond (Priest) on Apr 28, 2010 at 21:13 UTC | |
|
Re: www:mechanize mangles unicode
by gnork (Scribe) on Nov 04, 2011 at 10:04 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |