]> bicyclesonthemoon.info Git - ott/bsta/blobdiff - frame.1.pl
use encoding aware system functions & rewerked old logs tool
[ott/bsta] / frame.1.pl
index b8fb99d9f2b881ea0bc25bfc2dedd8b16c0b259b..360f8ad630aedbaf258ef4175bcc805dbde1d7df 100644 (file)
@@ -31,7 +31,8 @@ use botm_common (
        'url_query_decode',
        'read_data_file',
        'join_path',
-       'merge_url'
+       'merge_url',
+       'open_encoded', 'stat_encoded'
 );
 use bsta_lib (
        'STATE', 'INTF_STATE',
@@ -175,7 +176,7 @@ else {
 
 if ($try_onged) {
        $frame_path = join_path(PATH_SEPARATOR(), WWW_PATH(), $frame_file);
-       $r = open($fh, '<' , encode('locale_fs', $frame_path));
+       $r = open_encoded($fh, '<' , $frame_path);
        if ($r) {
                close($r);
                $frame_path = merge_url(
@@ -187,7 +188,7 @@ if ($try_onged) {
 }
 unless ($r) {
        $frame_path = join_path(PATH_SEPARATOR(), DATA_PATH(), $frame_file);
-       $r = open($fh, '<' , encode('locale_fs', $frame_path));
+       $r = open_encoded($fh, '<' , $frame_path);
        unless ($r) {
                exit fail_open_file($method, 'image file', $frame_file);
        }
@@ -197,7 +198,7 @@ unless (binmode($fh)) {
        exit fail_500("Can't switch file to binary mode.");
 }
 
-if (my @file_info = stat($frame_path)){
+if (my @file_info = stat_encoded($frame_path)){
        print 'Content-length: '.$file_info[7]."\n";
 }
 print 'Content-type: '.$frame_data{'content-type'}."\n";