Re: Bug#849531: Bug#849531: Possible security problem, new logwatch sends mails with charset UTF-8

Willi Mann <[email protected]> Sun, 1 Jan 2017 14:27:17 +0100
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
Hi,

Am 2017-01-01 um 00:20 schrieb Jason Pyeron:
> Not exactly a valid test, besides it works for me. The issue is internal ascii data being written as ascii but instructing consumers
> it is uft8. 
> 
> $ cat utf8_test.pl
> #!/usr/bin/perl
> #
> use strict;
> use File::Slurp;
> 
> my $inputfile = @ARGV[0];
> my $logfilecontent = read_file($inputfile);
> binmode(STDOUT, ":utf8");
> print $logfilecontent;
> 
> $ ./utf8_test.pl testlog.txt
> übersät
> 
> $ ./utf8_test.pl testlog.txt | hexdump -C
> 00000000  c3 bc 62 65 72 73 c3 a4  74 0a                    |..bers..t.|
> 0000000a
> 
> $ hexdump.exe -C testlog.txt
> 00000000  fc 62 65 72 73 e4 74 0a                           |.bers.t.|
> 00000008

What do you want to say with that? Your input is not in UTF-8.

Just for the record, the output what I posted originally:

% ./utf8_test.pl testlog
übersät
% ./utf8_test.pl testlog | hexdump -C
00000000  c3 83 c2 bc 62 65 72 73  c3 83 c2 a4 74 0a        |....bers....t.|
0000000e
% hexdump -C testlog
00000000  c3 bc 62 65 72 73 c3 a4  74 0a                    |..bers..t.|
0000000a

Bye
Willi

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Logwatch-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/logwatch-devel