use Encode qw(encode decode);
###PERL_LIB: use lib '/botm/lib/post';
-use botm_common qw(read_data_file write_data_file url_encode url_decode join_path);
+use botm_common (
+ 'read_data_file', 'write_data_file',
+ 'url_encode', 'url_decode',
+ 'join_path',
+ 'html_entity_encode_dec', 'html_entity_encode_hex'
+);
###PERL_ENCODING_FILE_IN: use constant ENCODING_FILE_IN => 'UTF-8';
###PERL_ENCODING_FILE_OUT: use constant ENCODING_FILE_OUT => 'utf8';
'help|h' => \$options{ 'help'}
);
+print html_entity_encode_dec('<a ="bleb & ęóąśłżźćń"/>')."\n";
+print html_entity_encode_dec('<a ="bleb & ęóąśłżźćń"/>', '', 1)."\n";
+print html_entity_encode_dec('<a ="bleb & ęóąśłżźćń"/>', 'UTF-8', 1)."\n";
+print html_entity_encode_hex('<a ="bleb & ęóąśłżźćń"/>')."\n";
+print html_entity_encode_hex('<a ="bleb & ęóąśłżźćń"/>', '', 1)."\n";
+print html_entity_encode_hex('<a ="bleb & ęóąśłżźćń"/>', 'UTF-8', 1)."\n";
+exit 0;
+
if ($options{'help'} ne '') {
print HELP_TEXT;
exit 0;
# }
# }
-
sub prepare_post {
(my $cmd_options, my $file_data) = @_;
my %post;