From a0f1e0e9db4b0edee45018c47a08761916af0ce6 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 7 Jun 2008 20:40:48 +0200 Subject: Revised UTF-8 filenames support --- UCoreClasses.pas | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'UCoreClasses.pas') 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; -- cgit v1.2.3