Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
HTTP::Engine::MiddlewaUserEContributed PerlHTTP::Engine::Middleware::Encode(3)

NAME
       HTTP::Engine::Middleware::Encode	- Encoding Filter

SYNOPSIS
       default:	in code	= utf8,	out code = utf8

	   my $mw = HTTP::Engine::Middleware->new;
	   $mw->install(
	       'HTTP::Engine::Middleware::Encode',
	   );
	   HTTP::Engine->new(
	       interface => {
		   module => 'YourFavoriteInterfaceHere',
		   request_handler => $mw->handler( \&handler ),
	       }
	   )->run();

       in code = cp932,	out code = cp932 (Shift-JIS)

	   my $mw = HTTP::Engine::Middleware->new;
	   $mw->install(
	       'HTTP::Engine::Middleware::Encode' => {
		   decode => 'cp932',
		   decode => 'cp932',
		   content_type_charset	=> 'Shift-JIS',
	       },
	   );
	   HTTP::Engine->new(
	       interface => {
		   module => 'YourFavoriteInterfaceHere',
		   request_handler => $mw->handler( \&handler ),
	       }
	   )->run();

       in code = detect	by Content-Type	header (default	encoding is utf8), out
       code = utf8

	   my $mw = HTTP::Engine::Middleware->new;
	   $mw->install(
	       'HTTP::Engine::Middleware::Encode' => {
		   detected_decode_by_header =>	1,
		   decode => 'utf8',
	       },
	   );
	   HTTP::Engine->new(
	       interface => {
		   module => 'YourFavoriteInterfaceHere',
		   request_handler => $mw->handler( \&handler ),
	       }
	   )->run();

AUTHORS
       precuredaisuki

       yappo

SEE ALSO
       Data::Visitor::Encode

perl v5.32.1			  2010-03-0HTTP::Engine::Middleware::Encode(3)

NAME | SYNOPSIS | AUTHORS | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=HTTP::Engine::Middleware::Encode&sektion=3&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help