crontab: make tempfile use utf-8 encoding

Authored by zhuyifei1999 on Thu, Oct 12, 4:51 AM.

Description

crontab: make tempfile use utf-8 encoding

The current version does not support crontabs with non-latin text,
and utf-8 as the default unicode encoding should hopefully resolve
nearly all crontabs with non-latin text. Those crontabs with non-utf8
binaries should be broken by nano (or many other text editors) anyhow.

We also change from manually calling encode & decode into opening
the tempfile with the encoding, because it looks better this way.

Bug: T156174
Change-Id: Ib85fc4fe6ca6e2f1f3ec9f7efdcc9e596e146aae

Details

Committed
zhuyifei1999Thu, Oct 12, 4:51 AM
Parents
rLTOL37a79983b9bb: Debian version bump
Branches
Unknown
Tags
Unknown
References
refs/changes/70/383770/1
ChangeId
Ib85fc4fe6ca6e2f1f3ec9f7efdcc9e596e146aae