It's an optimization to avoid unnecessary calls to Encode.pm. It should not affect the result.
On Thu, Jun 4, 2009 at 1:38 AM, Gisle Aas <gi...@aas.no> wrote: > On Mon, Jun 1, 2009 at 23:43, Alex Kapranoff <k...@nadoby.ru> wrote: > > The patch is attached. > > Thanks! I've now applied your patch. I do think I would like to get > rid of the 'if utf8::is_utf8($fi)' condition on encoding values. I > don't think the semantics should depend on this. Will that break > stuff for you? > > --Gisle > > > This attribute is rarely used in HTML but the interesting functionality > is > > encoding character bodies of generated requests into bytes according to > the > > specified encoding. > > > > If you try to click() a form specified as <form method="POST" > > enctype="multipart/form-data"> with some Unicode data in its fields you > will > > get this error: > > HTTP::Message content must be bytes at blib/lib/HTTP/Request/Common.pm > line > > 91 > > > > My patch fixes that by always encoding wide characters to the encoding > > specified in "accept-charset" attribute or set via method. Defaults to > > utf-8. Avoids unneeded encodings. > > > > Also, caution taken not to break compatibility with older perls. > > > > Docs and tests included. > > >