Skip to content

update-users-groups.pl: Use UTF-8 instead of latin1.#4896

Closed
ruediger wants to merge 1 commit intoNixOS:masterfrom
ruediger:fix-user-utf8
Closed

update-users-groups.pl: Use UTF-8 instead of latin1.#4896
ruediger wants to merge 1 commit intoNixOS:masterfrom
ruediger:fix-user-utf8

Conversation

@ruediger
Copy link
Contributor

@ruediger ruediger commented Nov 8, 2014

Perl seems to write the file in latin1 independent of the actual input
encoding. This can corrupt the description field of /etc/passwd. By
setting binmode to :utf8 Perl can be forced to write UTF-8. Ideally
the program would simply read/write the fields by value without any
changes in encoding. However, assuming/enforcing UTF-8 is a lot better
than using an obsolete coding like latin1.

Perl seems to write the file in latin1 independent of the actual input
encoding.  This can corrupt the "description" field of /etc/passwd.  By
setting "binmode" to ":utf8" Perl can be forced to write UTF-8.  Ideally
the program would simply read/write the fields by value without any
changes in encoding.  However, assuming/enforcing UTF-8 is a lot better
than using an obsolete coding like latin1.
@aristidb aristidb added 0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Nov 8, 2014
@aristidb
Copy link
Contributor

aristidb commented Nov 8, 2014

Merged manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.kind: enhancement Add something new or improve an existing system. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants