prototyp: UTF-8 encoding (decoding)
authorFrantišek Kučera <franta-hg@frantovo.cz>
Mon, 01 Sep 2014 18:10:25 +0200
changeset 78f0e2d417702
parent 6 dc83d208e862
child 8 0f6df6850ba6
prototyp: UTF-8 encoding (decoding)
prototyp/prototyp.sql
     1.1 --- a/prototyp/prototyp.sql	Mon Sep 01 18:02:48 2014 +0200
     1.2 +++ b/prototyp/prototyp.sql	Mon Sep 01 18:10:25 2014 +0200
     1.3 @@ -139,7 +139,7 @@
     1.4  	use strict;
     1.5  	use warnings;
     1.6  	
     1.7 -	use Encode; # FIXME: see below
     1.8 +	use encoding "UTF-8";
     1.9  	use User::pwent;
    1.10  	
    1.11  	while (my $user = getpwent()) {
    1.12 @@ -148,7 +148,7 @@
    1.13  			gid => $user->gid,
    1.14  			name => $user->name,
    1.15  			# comment => $user->comment,
    1.16 -			gecos => [split(",", Encode::decode("utf8", $user->gecos))], # FIXME: ugly hack – should be properly decoded in getpwent()
    1.17 +			gecos => [split(",", $user->gecos)],
    1.18  			home => $user->dir,
    1.19  			shell => $user->shell,
    1.20  			# expire => $user->expire