use Encode ('encode', 'decode');
use Exporter;
-use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
-# vX.Y.Z: X YYYZZZ
-$VERSION = 1.000010;
-@ISA = qw(Exporter);
-@EXPORT = ();
-@EXPORT_OK = (
+our $VERSION = '1.0.11';
+our @ISA = qw(Exporter);
+our @EXPORT = ();
+our @EXPORT_OK = (
'read_data_file', 'write_data_file',
'url_encode', 'url_decode',
'url_query_encode', 'url_query_decode',
'split_url', 'join_url', 'merge_url',
'html_entity_encode_dec', 'html_entity_encode_hex', 'html_entity_encode_name', 'html_entity_decode',
- 'join_path', 'make_temp_path'
+ 'join_path', 'make_temp_path',
+ 'system_encoded', 'exec_encoded'
);
-%EXPORT_TAGS = ();
return join_path('/', $dir, $filename);
}
+sub system_encoded {
+ (my $cmd, my @arg) = @_;
+ my @newarg;
+
+ my $newcmd = encode('locale_fs', $cmd);
+
+ foreach my $a (@arg) {
+ push @newarg, encode('locale', $a);
+ }
+
+ return system $newcmd, @newarg;
+}
+
+sub exec_encoded {
+ (my $cmd, my @arg) = @_;
+ my @newarg;
+
+ my $newcmd = encode('locale_fs', $cmd);
+
+ foreach my $a (@arg) {
+ push @newarg, encode('locale', $a);
+ }
+
+ return exec $newcmd, @newarg;
+}
+
##################