summaryrefslogtreecommitdiff
path: root/UCoreClasses.pas
diff options
context:
space:
mode:
Diffstat (limited to 'UCoreClasses.pas')
-rw-r--r--UCoreClasses.pas12
1 files changed, 6 insertions, 6 deletions
diff --git a/UCoreClasses.pas b/UCoreClasses.pas
index c53289f..0267843 100644
--- a/UCoreClasses.pas
+++ b/UCoreClasses.pas
@@ -118,10 +118,10 @@ begin
pwd := getpwent;
while pwd <> nil do begin
User := TUser.Create;
- User.UserName := PgcharToString(pwd^.pw_name);
- User.FullName := PgcharToString(pwd^.pw_gecos);
- User.HomeDir := PgcharToString(pwd^.pw_dir);
- User.LoginShell := PgcharToString(pwd^.pw_shell);
+ User.UserName := String(StrToUTF8(pwd^.pw_name));
+ User.FullName := String(StrToUTF8(pwd^.pw_gecos));
+ User.HomeDir := String(StrToUTF8(pwd^.pw_dir));
+ User.LoginShell := String(StrToUTF8(pwd^.pw_shell));
User.UID := pwd^.pw_uid;
User.GID := pwd^.pw_gid;
UserList.Add(User);
@@ -135,14 +135,14 @@ begin
grp := getgrent;
while grp <> nil do begin
Group := TGroup.Create;
- Group.GroupName := PgcharToString(grp^.gr_name);
+ Group.GroupName := String(StrToUTF8(grp^.gr_name));
Group.GID := grp^.gr_gid;
Group.Users := TStringList.Create;
{$R-}
if grp^.gr_mem^ <> nil then begin
i := 0;
repeat
- Group.Users.Add(PgcharToString(PCharArray(grp^.gr_mem^)[i]));
+ Group.Users.Add(String(StrToUTF8(PCharArray(grp^.gr_mem^)[i])));
Inc(i);
until PCharArray(grp^.gr_mem^)[i] = nil;
end;