diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-07 20:40:48 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-06-07 20:40:48 +0200 |
| commit | a0f1e0e9db4b0edee45018c47a08761916af0ce6 (patch) | |
| tree | dc9d05f5772442f61ec913631540b24cf67d5e8a /UCoreClasses.pas | |
| parent | ecde167da74c86bc047aaf84c5e548cf65a5da98 (diff) | |
| download | tuxcmd-0.6.38.tar.xz | |
Revised UTF-8 filenames supportv0.6.38
Diffstat (limited to 'UCoreClasses.pas')
| -rw-r--r-- | UCoreClasses.pas | 12 |
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; |
