log.pl
changeset 26 cf9761eb2538
parent 25 e8f1315b1617
child 27 10c207a978e2
equal deleted inserted replaced
25:e8f1315b1617 26:cf9761eb2538
    13 		  start special file processing (assuming output
    13 		  start special file processing (assuming output
    14 		  from apt, with text (default: APT: upgrade) going
    14 		  from apt, with text (default: APT: upgrade) going
    15 		  to the first line)
    15 		  to the first line)
    16     --logfile=s	  use this(!) logfile
    16     --logfile=s	  use this(!) logfile
    17 #
    17 #
       
    18 
    18 # something about charsets
    19 # something about charsets
    19 # * We assume the LOG file is always UTF-8!
    20 # * We assume the LOG file is always UTF-8!
    20 #   (I know, it's not true for historical entries, may be we can
    21 #   (I know, it's not true for historical entries, may be we can
    21 #   build some tool to convert the file line-by-line, or at least
    22 #   build some tool to convert the file line-by-line, or at least
    22 #   entry-by-entry -- and our database too.
    23 #   entry-by-entry -- and our database too.
    24 # * The current charset could be found using "langinfo CODESET"
    25 # * The current charset could be found using "langinfo CODESET"
    25 #   (hopefully - needs to be tested)
    26 #   (hopefully - needs to be tested)
    26 # Conclusion:
    27 # Conclusion:
    27 #   - On opening/reading the log file: convert from UTF-8 -> current codeset
    28 #   - On opening/reading the log file: convert from UTF-8 -> current codeset
    28 #   - If this fails, issue a warning, use "head <something>" to show the
    29 #   - If this fails, issue a warning, use "head <something>" to show the
    29 #     last LOG entry directly and then fire up the editor with an 
    30 #     last LOG entry directly and then fire up the editor with an
    30 #     empty file (or just added notice why we do not show the old
    31 #     empty file (or just added notice why we do not show the old
    31 #     messages)
    32 #     messages)
    32 #   - After editing: convert the current messsage to from the current
    33 #   - After editing: convert the current messsage to from the current
    33 #     codeset UTF-8
    34 #     codeset UTF-8
    34 #   - The same is for message on command line (but this is more easy, we
    35 #   - The same is for message on command line (but this is more easy, we
    35 #     do not have to cope with the old message log
    36 #     do not have to cope with the old message log
    36 
       
    37 
    37 
    38 use strict;
    38 use strict;
    39 use warnings;
    39 use warnings;
    40 use File::Basename;
    40 use File::Basename;
    41 use File::Temp qw(tempfile);
    41 use File::Temp qw(tempfile);