]> git.pld-linux.org Git - packages/MigrationTools.git/blob - MigrationTools-utf8.patch
- drop obsolete and outdated manual inclusion of rpm macros
[packages/MigrationTools.git] / MigrationTools-utf8.patch
1 diff -ur MigrationTools-47/migrate_passwd.pl MigrationTools-47.x/migrate_passwd.pl
2 --- MigrationTools-47/migrate_passwd.pl 2009-06-22 14:37:33.091177870 +0200
3 +++ MigrationTools-47.x/migrate_passwd.pl       2009-06-22 14:27:03.000000000 +0200
4 @@ -39,6 +39,9 @@
5  
6  require '/etc/openldap/migrate_common.ph';
7  
8 +use Text::Iconv;
9 +$converter = Text::Iconv->new("UTF-8", "ASCII//TRANSLIT");
10 +
11  $PROGRAM = "migrate_passwd.pl";
12  $NAMINGCONTEXT = &getsuffix($PROGRAM);
13  
14 @@ -70,28 +73,6 @@
15         next if /^#/;
16         next if /^\+/;
17  
18 -       s/Ä/Ae/g;
19 -       s/Ë/Ee/g;
20 -       s/Ï/Ie/g;
21 -       s/Ö/Oe/g;
22 -       s/Ü/Ue/g;
23 -
24 -       s/ä/ae/g;
25 -       s/ë/ee/g;
26 -       s/ï/ie/g;
27 -       s/ö/oe/g;
28 -       s/ü/ue/g;
29 -       s/ÿ/ye/g;
30 -       s/ß/ss/g;
31 -       s/é/e/g;
32 -
33 -       s/Æ/Ae/g;
34 -       s/æ/ae/g;
35 -       s/Ø/Oe/g;
36 -       s/ø/oe/g;
37 -       s/Å/Ae/g;
38 -       s/å/ae/g;
39 -
40         local($user, $pwd, $uid, $gid, $gecos, $homedir, $shell) = split(/:/);
41         next if (defined($minuid) and ($uid < $minuid));
42         next if (defined($maxuid) and ($uid > $maxuid));
43 @@ -193,7 +174,8 @@
44         }
45  
46         if ($gecos) {
47 -               print $HANDLE "gecos: $gecos\n";
48 +               $cgecos = $converter->convert($gecos);
49 +               print $HANDLE "gecos: $cgecos\n";
50         }
51  
52         print $HANDLE "\n";
This page took 0.083435 seconds and 3 git commands to generate.