NAME

Egg::Plugin::Encode - Plugin to treat character code.

SYNOPSIS

use Egg qw/ Encode /;

$e->encode->set(\$text)->utf8;

$e->utf8_conv(\$text);
$e->euc_conv (\$text);
$e->sjis_conv(\$text);

DESCRIPTION

This plug-in adds some methods to treat the character code conveniently.

If $e->config->{character_in} is set, it sets it up so that Egg::Request::parameters may unite character-codes of the request query.

It is "[in_code]_conv" as for the character-code set in $e->config->{character_in}. Specifying it becomes either of 'utf8' and 'euc' and 'sjis' because it develops with the method name.

If it wants to make the code excluding this treated, the method is made for the controller from the name of "[in_code]_conv", and the code name is set to $e->config->{character_in}.

METHODS

encode

The object for the character-code conversion acquired with $e->create_encode is returned.

* Does the problem occur according to the module used because it is Closure No be known.

create_encode

The object for the character-code conversion is returned.

It is possible to make the object of the favor Orbaraid this method as a controller, and returned.

Default is Jcode.

utf8_conv ( [TEXT], [ARGS] )

Shift->encode->set(@_)->utf8 is done.

* When create_encode is Orbaraided, necessary to Orbaraid this method. It might be.

euc_conv ( [TEXT], [ARGS] )

Shift->encode->set(@_)->euc is done.

* When create_encode is Orbaraided, necessary to Orbaraid this method. It might be.

sjis_conv ( [TEXT], [ARGS] )

Shift->encode->set(@_)->sjis is done.

* When create_encode is Orbaraided, necessary to Orbaraid this method. It might be.

SEE ALSO

Jcode, Egg::Release,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT

Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.